What Is Cross Domain Tracking ?

31 Jul

Cross domain tracking makes it possible for Google Analytics to see sessions on two related sites (such as an ecommerce site and a separate shopping cart site) as a single session. This is sometimes called site linking.

  • How Cross Domain Tracking Works  ?
  • If you implement cross domain tracking on your website, then it is possible for Google Analytics to see this as a single session by a single user. Below is example of working of cross domain tracking :seo

Set up cross domain tracking by modifying tracking code :

  1. Set up a property in your Google Analytics account.
  2. Use the same tracking code snippet and tracking ID from that property for all of your domains.
  3. Edit the tracking code for the primary domain.
  4. Find the create line in the snippet. For a website called com, it looks like this:   ga(‘create’, ‘UA-XXXXXXX-Y’, ‘YourPrimaryWebsite.com‘);
  5. Make the following changes to the snippet (the changes you need to make are inbold Green text):   ga(‘create’, ‘UA-XXXXXXX-Y’,‘auto’, {‘allowLinker’: true});
    ga(‘require’, ‘linker’);
      ga(‘linker:autoLink’, [‘com‘] );
  6. For three or more domains :
    Follow the example above, but add the other domains to the autoLink plugin. Even the additional comma here is important:ga(‘linker:autoLink’, [‘com, ‘YourThirdWebsite.com] );
  7. NowEdit the tracking code on the secondary domain.

Find the create line in the snippet. Make the following changes to the snippet (the changes you need to make are in bold Blue text):

ga(‘create’, ‘UA-XXXXXXX-Y’, ‘auto’, {‘allowLinker’: true});
  ga(‘require’, ‘linker’);
  ga(‘linker:autoLink’, [‘YourPrimaryWebsite.com’] );

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: