Analytics
1.9K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

Validate subdomain tracking

[ Edited ]
Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆

Hi,

 

I have a main domain test.com and a subdomain abc.test.com. As it is said in google support, we do not want to customize the code for subdomain tracking. Here is my analytics configuration,

 

I have 3 view,

 

Master view

main domain view (test.com)

subdomain view (abc.test.com)

 

I did not setup any filter in Master view except Domain to URI filter

 

I setup a filter in my main domain view to include only test.com traffic

 

I setup a filter in my sub domain view to include only abc.test.com traffic

 

So here i validate my subdomain tracking using Google Tag Assistant recordings

 

I opened the main domain (test.com) and navigate to subdomain (abc.test.com)

 

I end the recordings here.

 

I opened the recording and viewed the google analytics report.

 

I selected my main domain (test.com) view and subdomain (abc.test.com) view in the "Select views" pop box.

 

And the flow report shows sessions started for both main domain (test.com) and subdomain (abc.test.com).

 

Please let me know if the way i am doing is right or not.

 

Thanks in Advance.

 

Regards,

Magesh

 

1 Expert replyverified_user

Validate subdomain tracking

Top Contributor
# 2
Top Contributor

Hi, Magesh,

 

With Universal Analytics, sub-domain tracking is automatic, as long as you set the cookie domain to "auto". Here is a great guide that explains both cross- and sub-domain tracking: https://www.simoahava.com/analytics/cross-domain-tracking-across-subdomains/. And here is a Google Support link about the 'cookieDomain': https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#cookieDomai....

 

As long as you have the same tracking code on every page of your site, then your sub-domain tracking should be working.

Nicky Yuen, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn

Validate subdomain tracking

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi Nicky,

 

Thanks for your support.

 

As i have same code on both my domain and subdomain, and the cookie domain set to auto.

 

My question is how to validate whether it works or not using Google Tag Assistant.

 

Please assist me step by step in validating it.

 

Thanks in Advance.

 

Regards,

Magesh