Reply
Highlighted
Visitor
Posts: 6
Registered: ‎01-16-2018
Accepted Solution

Google Analytics Crossdomain tracking

Hello,

We're having issues setting up Crossdomain tracking in our Google Analytics tags. We've consulted numerous threads and ofcourse the documentation, but the '_ga' is not appended to any of the cross domain addresses.

- Cross domain tracking is set to On
- The domains are comma separated and do contain any spaces
- The domains are all subdomains of one parent domain

I do want to point out one thing I spotted while I was trying to debug this using the "Google Analytics debugger" chrome extension. It returns the warning message; "Expected a boolean value for the field "allowLinker". But found "string"".

ga_Error.jpg


I do know that the variable allowLinker is related to the GA cross domain tracking. Could this be breaking it, and how can I resolve this?

Any help is greatly appreciated.

 

 

Reply
0 Kudos
VIP
Posts: 202
Registered: ‎01-04-2016

Re: Google Analytics Crossdomain tracking

Hi @LeroyPijlman - the first place I would start is to make sure all your tag templates are up to date.  Out of date templates have caused me more grief than I'd care to admit.  Use Tag Status Checker to determine each template's situation then update accordingly. There's great instructions here on the forum if you need them. 

 

Best of luck, let us know how it goes!

Visitor
Posts: 6
Registered: ‎01-16-2018

Re: Google Analytics Crossdomain tracking

@mitchellt Thank you for your reply. My tag was actually out of date. I was not familiar with the tag status checker yet, but I read up on it just now, and managed to update it.

ga_error2.jpg

 

Unfortunately did this not solve the problem. 

 

Reply
0 Kudos
VIP
Posts: 202
Registered: ‎01-04-2016

Re: Google Analytics Crossdomain tracking

Hi @LeroyPijlman - so, next thing, have you checked into this article about GA cross domain tracking?

https://community.tealiumiq.com/t5/Tags/Google-Universal-Analytics-Tag-Advanced-Mapping/ta-p/11985

this one too:  https://community.tealiumiq.com/t5/Tags/Setting-Up-Google-Universal-Analytics-Cross-Domain-Tracking/...

 

If all else fails, open a support ticket and the Tealium folks will help.

Visitor
Posts: 6
Registered: ‎01-16-2018

Re: Google Analytics Crossdomain tracking

[ Edited ]

@mitchelltLast night I learned about 'gtag.js', as opposed to 'analytics.js'. I completely gave up and decided to migrate to gtag.
Upgrading seems to have worked, and the warning message no longer appears.

The only issue I'm facing, is that one of the domains that does not fall under the same parent domain is not properly being 'cross-domain-tracked'.
But the second link you just posted seems to answer this! I'm going to try this out and report back.
Though my initial problem is now solved. Thank you a lot for your input @mitchellt! :)

edit: gtag does not appear to have the 'domain' field for specifying domains that have a different top level domain.
Do you happen to know how I can configure CDT in this scenario in gtag?

Employee Emeritus
Posts: 1,019
Registered: ‎08-26-2015

Re: Google Analytics Crossdomain tracking

Hello @LeroyPijlman. Thank you for all the great follow up to this post! Much appreciated.

Let me ask @jason_paddock if he can assist you with the gtag.js version of cross domain tracking. Jason, when you have a moment can you assist? Thank you!

Remember to give me a kudo if you like my post! Accepting my post as a solution is even better! Also remember that search is your friend.
Employee Emeritus
Posts: 56
Registered: ‎09-01-2015

Re: Google Analytics Crossdomain tracking

Hi @LeroyPijlman,

I see that gtag supports the domain field.  Here is Google's documentation: https://developers.google.com/analytics/devguides/collection/gtagjs/cross-domain.  Their examples highlight different top level domains.

The Tealium tag also has the fields for turning on cross domain tracking and specifing the domains.

If you continue to have problems, please reach out to support so we can look at your specific setup.

Thanks!

Visitor
Posts: 6
Registered: ‎01-16-2018

Re: Google Analytics Crossdomain tracking

[ Edited ]

Thank you for your positive feedback @kathleen_jo!

@jason_paddock I learned a lot from this article, thank you. I followed the instructions ... and ... 

The id is consistent between all the domains now!
 
However - one strange thing I do want to point out is;

In my current scenario, if I follow the following path;
Domain A  -> Domain B -> Domain C

Where domain A and C are within the same parent domain and B is not.

The debugger shows the same id across all these hops. However, _ga is not appended in the url of Domain B. But when hopping from B to C, _ga IS appended in the url. Note; B is opened through an 'iframe'. Could this be the cause?

I'm strictly asking this out of curiosity - the original issue is now resolved, as I can track users across different domains within a session. Thank you kindly. :)

Employee Emeritus
Posts: 56
Registered: ‎09-01-2015

Re: Google Analytics Crossdomain tracking

Hi @LeroyPijlman,

That is the expected behavior of the Google library.  The linker function only works on <a></a> tags.  Opening an iframe won't work.  You'll have to figure out a way to decorate the iframe URL with the ga code.  I'm not finding any documentation on how to do this for the new gtag library.  It was possible on analytics.js, so I would assume that there is a method for it, but it will take some detective work.