Download

Documentation

Setup Cross-domain Tracking in WordPress

For tracking the users across multiple domains in Google Analytics, It is being recommended by Google to use official Linker plugin instead of setting up Cross-domain tracking yourself. So, at Analytify, We have added an easy way for you to set up cross-domain tracking.

 

We support analytics.js i.e Universal Analytics tracking only as Traditional ga.js tracking has been deprecated by Google.

 

Let's say you have 2 sites with name source.com and destination.com. The first step is to install and set up analytify on both WordPress sites as shown below in pictures. Note carefully about the code snippet added in Custom JS Code text areas. You have to link each site to their connected sites. e.g.

On source.com:
ga('linker:autoLink', ['destination.com']);

On destination.com:
ga('linker:autoLink', ['source.com']);

Note: Do not add http/https with the domain name.

 

Plugin Settings (Advanced Tab) for source.com

 

Plugin Settings (Advanced Tab) for destination.com

 

 

What If you want to set up Cross-domain tracking on sites NOT on WordPress?

Check out the  following example:

Let say you have two sites i.e. site-1.com and site-2.com Not on WordPress. To integrate the cross-domain tracking add the below code in the header of each site respectively. Remember to include the Google Analytics code snippet as well.

On site-1.com:

ga('create', 'UA-XXXXX-Y', 'auto', {allowLinker: true});
ga('require', 'linker');
ga('linker:autoLink', ['site-2.com']);

On site-2.com:

ga('create', 'UA-XXXXX-Y', 'auto', {allowLinker: true});
ga('require', 'linker');
ga('linker:autoLink', ['site-1.com']);

 

DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.
close-link