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
3.2K members online now
3.2K 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 w/ Sub-Domain

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi,

 

I have multiple subdomains. education.warriortrading.com, secure.warriortrading.com, webinar.warriortrading.com, and warriortrading.com

 

I have the analytics code for the domain warriortrading.com installed on all of these subdomains.

I see the data coming in like page views, but I am losing the original source of the traffic as they navigate across the domains. 

 

How can I make sure to track the original source of the traffic as they navigate to and from the primary domain and sub domain.

 

Here is the code installed on every page:

 

 

(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','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXXXXX-1', 'auto'); ga('send', 'pageview');

 

 

I look forward to getting help on this and dialing in my tracking! Thanks for the time and help in advance.

 

Alex

Cross Domain Tracking w/ Sub-Domain

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆

Your snippet is correct. You should check:

 

1) The same snippet is implemented on all subdomains (including your main domain).

2) No other Analytics snippets are loaded

3) warriortrading.com is added to the referral exclusion list in your property settings 

 

Cross Domain Tracking w/ Sub-Domain

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

The snippet is across all domains and subdomains confirmed.

 

There is another GA pixel on those pages as well. You can see it by looking at source code here: https://webinar.warriortrading.com/signup

 

Search "pageview" and you can cycle through and see the first GA code, not ours, and then the FB, TWTR and Google pixel at the bottom. Is this interfering having two GA codes?

 

Thanks for your response.

Alex

Cross Domain Tracking w/ Sub-Domain

[ Edited ]
Explorer ✭ ✭ ☆
# 4
Explorer ✭ ✭ ☆

Yes, that will interfere. It's not possible to run two or more trackers at the same time without renaming one of them - otherwise they will basically overwrite each other. If you need to run multiple trackers, you should follow the instructions on this documentation page:

 

https://developers.google.com/analytics/devguides/collection/analyticsjs/creating-trackers#working_w...