I'm trying to understand the cross domain behavior on multiple websites. I have this information
Website ClientID SessionId
-------------------------------------
domain1 xxx d.0686
domain2 xxx d.0686
domain3 yyy f.1871
domain2 yyy f.1871
domain4 yyy f.1871
domain1 zzz n.9210
domain2 zzz n.9210
People can move across multiple website but they keep the ClientID (stored as a cookie) and the SessionID (shared between different website when a person moves from a domain to another).
I need to see how many SessionID two different websites share. I guess the easiest way is to create a Matrix counting the shared unique SessionIds. This would be the result based on the above table
Domain1 Domain2 Domain3 Domain4
--------------------------------------------------------
domain1 0 2 0 0
domain2 2 0 1 1
domain3 0 1 0 0
domain4 0 1 0 0
This way I can count how many times two different website are used in the same sessionID and create a Chord Diagram with circlize()
package to visualise the relation.
Is it possible to do it on R?