After speaking with a Google Analytics support person, he says that for cross/multiple domain tracking to work the domains as well as 'require' and 'linker' should be in single quotes. Here's how it is on our site now:
(function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,"script","//www.google-analytics.com/analytics.js","ga");ga("create", "UA-xxxxxxx-4", {"cookieDomain":"auto","allowLinker":true});ga("require", "linker");ga("linker:autoLink", ["mysite.org","www.mysite.org","www.mysite.org","xxx.mysite.org","my.mysite.org","xx.mysite.org","mysite.org"]);ga("send", "pageview");
Attached is a screen shot showing the results of the Google Tag Assistant erroring with Unknown method name: 'linker:autoLink'
If you look at the Google docs this is what's recommended, notice, single quotes.
https://support.google.com/analytics/answer/1034342?hl=en
Edit the tracking code on the secondary domain.
Find the create line in the snippet. Make the following changes to the snippet (the changes you need to make are inbold red text):
ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['example-1.com'] );
Remember to replace the example tracking ID (UA-XXXXXX-Y) with your own tracking ID, and replace the example primary domain (example-1.com) with your own primary domain name.
The tracking code snippet must contain these changes every place it appears on your secondary domain.
For three or more domains
Follow the example above, but add the other domains to the autoLink plugin. Even the additional comma here is important:
ga('linker:autoLink', ['example-1.com', 'example-3.com'] );
Is there at least a work around using the advanced options in the module?
Comment | File | Size | Author |
---|---|---|---|
linker.png | 27.29 KB | rkudyba |
Comments
Comment #2
hass CreditAttribution: hass commentedBullshit. Ask the google guy if he is any idea about javascript or is developer.
Comment #3
hass CreditAttribution: hass commentedTag abuse.
Comment #4
rkudyba CreditAttribution: rkudyba commentedOk so what is the unknown method name error?
Comment #5
rkudyba CreditAttribution: rkudyba commentedComment #6
hass CreditAttribution: hass commentedA bug in google tag assistent. Tell them they need to fix it.
Comment #7
rkudyba CreditAttribution: rkudyba commentedBut the domains are not showing in the GA reports. Which module file has the double quotes so I can test using single quotes?
I reported the bug to Google awaiting a response.
Comment #8
hass CreditAttribution: hass commentedHave you seen this known issue?
Have you ever used search feature in your editor?
Comment #9
rkudyba CreditAttribution: rkudyba commentedLook like it's the same problem.
What do you mean by using the search feature in the editor?
Also confirmed with Google Tag Assistant maintainers it's a bug with the latest release.
Comment #11
alexharries CreditAttribution: alexharries commentedHass, your responses are extreme bordering on the unacceptable. Before I report your attitude to the moderation team, is there some kind of history between you and rkudyba which might explain this?
Otherwise, this is completely beyond the pale.
Alex