AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.5K members online now
2.5K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Cross-Domain Tracking Not Working After Multiple Attempts

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I've been having some difficulty with cross domain tracking with my Google Analytics account. I have tag manager linked to my GA Universal Analytics account with the code on every page across www.a.com and www.b.com. My issue is that it’s showing that a lot of my website traffic is coming from a.com / referral.

 

In GTM I have them as auto-linked domains in the Universal Analytics tag, and on GA I have both a.com and b.com showing up as referral exclusions.

 

I’m wondering if there is something I’m missing? www.b.com is an https:// website, and we often link to a https://secure.b.com, so I’m curious if that could be causing part of the problem?

 

Another thing I’ve seen a lot is people adding this string of code to their GA tracking code:

 

  ga('require', 'linker');
  ga('linker:autoLink', [‘a.com,'b.com']);

 

I was wondering if rather than linking Universal Analytics to GTM directly what would happen if I made a tag with custom HTML and entered my GA tracking code with that code added to it.

 

Any ideas or help would be great! I am very interested to see where we are actually getting referrals by.

1 Expert replyverified_user

Cross-Domain Tracking Not Working After Multiple Attempts

Top Contributor
# 2
Top Contributor

Hi,

 

Please check the document below about setting up cross domain tracking using the linker plugin:

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/linker

 

Make sure you add all your domains to the Referral Exclusion List:

 

https://support.google.com/analytics/answer/2795830

 

Moving from http to https should not cause referral loss.

 

Hope this helps, let me know if you have questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Cross-Domain Tracking Not Working After Multiple Attempts

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Arnold,

 

Thanks for the quick response! 

 

I understand how to add the linker plugin to the Google Analytics tracking code. My issue is that I use tag manager code onto my website and have GA linked to tag manager as a Universal Analytics tag, so I don't believe I can directly edit the Google Analytics tracking code, unless I'm mistaken?

 

My guess would be that I need to set up cross-domain tracking in tag manager, which I've gone through the steps to do but am not seeing any positive results (in the Universal Analytics tag I have allowLinker = true, cookieDomain = auto, and then I have a.com and b.com in Allow Link Domains). 

 

I'm thinking that it might work if I link my GA and GTM accounts using custom HTML, and then I can change the GA tracking code, but I feel like there has to be a simple way to do it while still being able to use the built in Universal Analytics tag.

 

Once again, any tips would be great! I'm fairly inexperienced with both GA and GTM so I could be completely missing something.

Cross-Domain Tracking Not Working After Multiple Attempts

Top Contributor
# 4
Top Contributor

Hi,

 

 

The built in Universal Analytics tag is working fine when it is configured properly, it seems that you did everything correctly. Did you test if a new session is triggered when moving across the domains? Those referrals from a.com can be users from before you added the domains to the referral exclusion list returning as direct and they have that referral still set. Please try to test using Google Tag Assistant Chrome extension to see what is happening like described here: https://support.google.com/analytics/answer/1034342?hl=en#Verify

Hope this helps.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital