Table of Contents

Cross Domain Tracking

Cross domain tracking with e-Marketer

e-Marketer enables automatic tracking of user activities across different domains! Doing so will enable you to track the entire activity of users throughout all your domains.The process involves running a custom function that will open an iFrame to the requested domains (if the function does not include specific domains URLs, e-Marketer will automatically use all domains defined in your account “domain settings”). The iFrame is linked to a URL which contains a few URL parameters representing user information such “user id”, “session id”, “always segment”, etc. Using the iFrame URL mechanism enables e-Marketer to check if this user has already visited another domain and if so, it will extract his existing user id provided by the other domain and will open a cookie for him which will be based on that data. Doing so will ensure that all activities done on both (or more) domains will be attributed to the SAME user.To achieve cross-domain tracking, please follow one of the following two options.

Option one:

  1. Define all the domains you’d like to track in the “Domain Settings” page
  2. Place the e-Marketer tracking code into all the different domains you’d like to track
  3. Run the following function (using a JavaScript action) on all the new visitots to each one of the domains:

_S_T.pass_cookie([‘//gc.synxis.com/’, ‘//google.com/’])

Option two:

Use the following function to change every link on the page so it will also include the e-Marketer “User Id”:

var anchors = document.getElementsByTagName(‘a’);

for (var i=0; i<anchors.length; i++)

{    var a = anchors[i];

    if (a.href && a.href.indexOf(‘//’)!=-1 && a.href.indexOf(location.hostname)==-1) // if has different host

    {    a.href = _S_T.pass_cookie_url(a.href);

    }

}

Note: You can also limit the search to specific domains by using the following code (Note: sub-domains are tracked by default when the main domain is called/checked):

var wanted_domain = ‘PLACE_YOUR_DOMAIN_NAME_HERE.COM‘;

var anchors = document.getElementsByTagName(‘a’);

for (var i=0; i<anchors.length; i++)

{    var a = anchors[i];

    if (a.href && a.href.indexOf(‘//’+wanted_domain)!=-1)

    {    a.href = _S_T.pass_cookie_url(a.href);

    }

}