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
5.1K members online now
5.1K 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 Setup

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I have set up cross-domain tracking according to this article: How to set up cross-domain tracking to link our site https://artoflivingretreatcenter.org with retreat.guru, where the registration platform for the first site is hosted.

 

We are encountering a few issues:

On one funnel path, the second domain is displaying the tag for both analytics accounts, as seen through the extension google tag assistant.

Page 1: https://artoflivingretreatcenter.org/plan-your-trip/accommodations/

Page 2: https://artoflivingretreatcenter.secure.retreat.guru/program/stay-with-us/?form=1&_ga=1.238685122.39...

 

However, we're getting two error messages:

No HTTP response detected
Missing analytics.js script

 

On the second funnel path, the second domain does not display the tag for either analytics account.

Page 1: https://artoflivingretreatcenter.org/event-registration/?ee=479

Page 2: https://artoflivingretreatcenter.secure.retreat.guru/program/sri-sri-yoga-retreat-6/?form=1&_ga=1.14...

 

Neither funnel registers in google analytics. Does anyone have any expertise to lend?

 

Thank you,

 

Andrew

1 Expert replyverified_user

Re: Cross Domain Tracking Setup

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi @Andrew K :-)

You mention both analytics accounts.
Are you using two analytics accounts on the retreat guru site?
Is there a purpose for using a 2nd analytics account?
Cross domain tracking requires tracking code for the single same property to be placed on all the domains

that are being cross domain tracked.

What property is meant to be being used for tracking?
UA-48889024-1 or UA-58784667-1 ?

There should be a single tracking code in use across both sites 
eg property UA-58784667-1 

https://artoflivingretreatcenter.org/
<script>
(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-58784667-1','auto',{'allowLinker':true});
ga('require','linker');
ga('linker:autoLink',['retreat.guru']);
ga('send','pageview');
</script>

 

then on the retreat.guru pages

<script>
(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-58784667-1','auto',{'allowLinker':true});
ga('require','linker');
ga('linker:autoLink',['artoflivingretreatcenter.org']);
ga('send','pageview');
</script>

both sites need to be on the Referral Exclusion List for the property

and then a View with the following filter needs to be created

  • Filter Type: Custom filter > Advanced
  • Field A: Hostname Extract A: (.*)
  • Field B: Request URI Extract: (.*)
  • Output To: Request URI Constructor: $A1$B1

Click Save to create the filter.

Having moer than one tracking code is doable but requires further setup
So if the other property isnt required, then i wouldnt add a 2nd tracking code snippet for 

property UA-48889024-1

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Cross Domain Tracking Setup

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi @Bronwyn V,

 

Thank you for the expert reply. I am setting up the script for domain B (retreat.guru). It looks like the code initially implemented uses their own UA-ID.

 

Given your suggestion, would they then have multiple google analytics scripts - one script for their own UA-ID and a separate script for each domain they need cross-domain tracking for?

 

If that is the case, I may recommend that they shift to tag manager, which appears to have a simpler way to set up cross-domain tracking across multiple domains. What would be your recommended approach?

 

Thank you,

 

Andrew

 

Thank you,

 

Andrew

Re: Cross Domain Tracking Setup

Top Contributor
# 4
Top Contributor

Hi @Andrew K :-)

 

I'll possibly break this down into a couple of posts coz there is a lot of info/screenshots etc

Looking at the home page of https://artoflivingretreatcenter.org there are two lots of partial GTM tracking code added for the same GTM Container ID, so not sure what is happening there.. and then there seems to be some other code related to GA (outlined in blue) which im not really sure what it is doing (sorry my JS and jQuery skills are somewhat lacking)

gtm-huh.jpg

 

aolrc-gtm.jpg

 

 regarding installation of GTM, there are two pieces of code a script section that goes before the closing </head> tag and a noscript section that goes just after the opening <body> tag

gtm-install.jpg

 

Page 1: https://artoflivingretreatcenter.org/plan-your-trip/accommodations/ 

is showing the same code setup as being installed on the homepage.

Page 2: https://artoflivingretreatcenter.secure.retreat.guru/program/stay-with-us/?form=1&_ga=1.32598014.198...

has a code syntax error in the tracking code snippet .. which is visible if you check the page with chrome dev tools

retreatguru-syntax.jpg

 In the above screenshot, if you look at the single quotes around the domain name, 

ga('linker:autoLink', [artoflivingretreatcenter.org] );

they are entered like quotes from a word processed doc rather than plain text which can be easily fixed by editing the code.

 

2nd funnel.

page 1: https://artoflivingretreatcenter.org/event-registration/?ee=479
again, same issues as above re the GTM container code

 

page2: https://artoflivingretreatcenter.secure.retreat.guru/program/sri-sri-yoga-retreat-6/?form=1&_ga=1.14...

same issues with the typo in the line of code 

ga('linker:autoLink', [artoflivingretreatcenter.org] );

 

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Cross Domain Tracking Setup

Top Contributor
# 5
Top Contributor

@Andrew K

 

I'm not currently seeing the retreat.guru tracking code for property UA-48889024-1 on the artoflivingretreatcenter.secure.retreat.guru pages any longer?

 

regarding cross domain tracking between artoflivingretreatcenter.org to artoflivingretreatcenter.secure.retreat.guru
I would be setting the auto link domain specifically to artoflivingretreatcenter.secure.retreat.guru instead of simply retreat.guru as tracking for property UA-58784667-1 is restricted to the sub.sub.sub domain, and not available on the parent/main domain.

 

also im not sure if having tracking setup via GTM to cross domain track to a non GTM tracking code setup can possibly result in issues/inconsistencies due to differences in the tracker names that the different setups use.

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here