LOG IN OR SIGN UP
Log in to your account
Sign up

How To Track Your Visitors Across Multiple Domains In GA

22 March 2017 | 0 comments | Posted by Che Kohler in nichemarket Advice

Track your visitors across multiple domains

Having multiple domains can be a pain especially if they are used in a way that they actually feed one another traffic. For example, you may have a site nichemaket.co.za where all your content lives but you also sell goods in an eCommerce store called nichemaketmerch.co.za and your content site links across to your eCommerce site regularly.

While this is not an ideal setup for a site and I wouldn't recommend it to anyone, the reality is that there are sites set up this way and they do need desperate help with their tracking. The only thing worse than having no data is having bad or corrupted data and no other website structure provides more inaccurate data than the multiple domain set-up.

What is a multiple domain setup?

A multiple domain set-up is a process of buying up and registering multiple domain names and setting up sites to service either different niches, geographic locations or due to limitations in your CMS. It was also a black hat SEO technique that proved very popular a few years ago and some sites are still living with these legacy issues today.

Why do multiple domains cause tracking issues?

Multiple domains cause tracking issues primarily because they are completely different sites, either the base URL is different or the TLD extension is different. Having a completely different site and passing users between them means as soon as a user leaves your one site for another it's seen as a brand new visit. Your site properties will be feeding each other visits they are not attributed correctly and lumped into referral traffic. Another bummer is you normally have to track these sites individually with separate Google Analytics accounts.

Examples of multiple domain base URL

  • nichemarket.co.za
  • nichemarketSEO.co.za
  • nichemarketcapetown.co.za

Examples of multiple domain TLD URL

  • nichemarket.co.za
  • nichemarket.com
  • nichemarket.com.ng
If you have a multiple subdomain setup check out our article How To Track Visitors Across Multiple Subdomains In GA

But all this can be alleviated with the help of cross-domain tracking. Cross-domain tracking is one of the more complex, confusing and often misunderstood areas of web analytics. It involves cookies, browser security settings, and an understanding of your overall measurement strategy but I hope to simplify it for you.

How to set up cross domain tracking

There are two ways of executing cross-domain tracking each depends on the set up of your sites and perhaps a combination of both may work for you. So I'll run through how to set up cross-domain tracking using both methods.

Method 1: Google Analytics Adaptation

1. Set up a property in your Analytics account For cross domain tracking, set up one property in your Analytics account. Use the same tracking code snippet and tracking ID from that property for all of your domains.

2. Edit the tracking code for the primary domain which should look like this.

ga('create', 'UA-XXXXXXX-Y', 'example-1.com');

and then update it to this if you have one additional domain

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

Remember to replace the example tracking ID (UA-XXXXXX-Y) with your own tracking ID, and replace the example secondary domain (example-2.com) with your own secondary domain name.

Or update it to this if you have two or more additional domains

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

3. Add the following code to head tag of your secondary domains For 1 additional domain add the following

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

For more than 1 additional domain add the following

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

Method 2: Google Tag Manager

  1. Install Google Tag Manager Snippet on all of your domains
  2. Open up your Google Tag Manager account
  3. Create a new tag
  4. Select Universal Analytics as the tag type
  5. Add your Google Analytics Tracking ID
  6. Select page view as the track type
  7. Click more settings
  8. Click field to set
  9. Set field name to allowLinker and value to true
  10. Set field name to cookieDomain and value to auto
  11. Select cross-domain tracking
  12. Under auto link domains supply a comma-separated list of your primary domain and additional domains to set up automatic cross-domain link tracking
  13. Set firing trigger to page view, all pages
  14. Save your tag and publish
Protip! You may want to set up reporting views and filters depending on your domain setup and the way visitors flow between domains as well as set up a domain referral exclusion list to not duplicate your visits across domains.

Test your setup

The best way to validate that cross-domain tracking is set up correctly is to use Google Tag Assistant Recordings, install it on your chrome browser and visit multiple pages across domains.

Many names one domain

If you have a multiple domain site structure without cross-domain tracking, how have you been handling your reporting? Do you feel this would be a better option for you? Let us know in the comments below.

Contact us

If you want to know more about improving your tracking solutions don’t be shy we’re happy to assist. Simply contact us here

Tags: Data Analysis, google analytics, google tag manager

Previous: {{ previousBlog.sTitle }}

Posted {{ previousBlog.dtDatePosting }}

Next: {{ nextBlog.sTitle }}

Posted {{ nextBlog.dtDatePosting }}

You might also like

Cannabis wellness industry

Understanding Cannabis in Modern Wellness

12 December 2024

Posted by Alina Jones in Mind, Body & Soul


Cannabis is revolutionizing wellness, offering natural solutions for pain, stress, and holistic health through innovative, science-backed approaches ...

Read more
Google deindexing reputation abuse

Google Ramps Up De-indexing of Domain Reputation Abuse

24 November 2024

Posted by Che Kohler in nichemarket Advice


Google continues to fight against publishers, removing their pages from search results for unrelated made-for-advertising content or affiliate-only c...

Read more

Leave us a comment


{{comment.sUserName}}

{{comment.iDayLastEdit}} day ago

{{comment.iDayLastEdit}} days ago

{{comment.sComment}}

Sign up for our newsletter