Google Analytics Crossdomain tracking

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"".

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?

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.

Google Analytics Crossdomain tracking

@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?

Google Analytics Crossdomain tracking

@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.

Google Analytics Crossdomain tracking

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.