Analytics
2.8K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
 
Guide Me
star_border
Reply

How to track single domain to subdomain in one view

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am sure this question has been asked many times but unfortunately I cannot see any previous posts and I have done lots of searching around other sites (there are some posts out there for legacy analytics.ga but I couldn't find any for UA .js)

 

On my single account I want to track from my primary domain (example.com) to my secure subdomain (secure.example.com). I am using analytics.js. As it is a single domain I know I don't need to use Google Cross Tracking.

 

I have created a unique property for the domain and a property for the subdomain. The .js snippet generated for each property has a different 'UA-XXXXX-1' and 'UA-XXXXX-3'.

 

I have read everywhere that the SAME .js snippet must be inserted on all pages but WHICH snippet do I use and on which pages?

 

I have successfully set up individual views for the domain example.com and subdomain secure.example.com but how do I set up a view so that I can analyse traffic BETWEEN the two in one view? Do I create a unique view in the domain (example.com) or the subdomain (secure.example.com) or somewhere else?

 

I hope you can help.

 

 

1 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author AlClBl R
January 2016

Re: How to track single domain to subdomain in one view

Top Contributor
# 4
Top Contributor
Hi,

You need to have the tracking code with the UA-ID UA-XXXXX-1 on both example.com and secure.example.com. This way you'll be able to track the users when they are moving between example.com and secure.example.com. Please check if you have example.com added to the referral exclusion list in Admin -> Property -> Tracking Info -> Referral Exclusion List. You need the domain name added there to prevent triggering a new session when the user is moving between the subdomain and the main domain. Let me know if you have more questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: How to track single domain to subdomain in one view

Top Contributor
# 2
Top Contributor
Hi,

If you want to track the domain and the subdomain in the same property then you need only one property. So you need to use the tracking snippet with the same UA-ID on both. Let me know if you have questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to track single domain to subdomain in one view

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Thank you Arnold.

Just to be sure ....

"you need only one property..."

do I stick to analysing just one property, ie. the main domain (example.com) and forget analysing the subdomain (secure.example.com) separately (but not delete it)

"you need to use the tracking snippet with the same UA-ID on both" ....

if so, the main domain (exmple.com) has the UA-XXXXX-1 therefore do I remove the UA-XXXXX-3 from all the subdomain pages and substitute UA-XXXXX-1 on each secure.example.com page.

on my sub domain (secure.example.com) I have many forms each with a unique URL (eg. https://secure.example.com/index.php?id=59?) and then several steps (pages) within each form.

If I insert the same UA-ID on the domain and subdomain will I be able to see the user path all the way through the secure.example.com?
ie. example.com > secure.example.com/index.php?id=59? > step 1 > step 2 > step 3 > buy

Once I get this cracked I want to link AdWords to all this !










Marked as Best Answer.
Solution
Accepted by topic author AlClBl R
January 2016

Re: How to track single domain to subdomain in one view

Top Contributor
# 4
Top Contributor
Hi,

You need to have the tracking code with the UA-ID UA-XXXXX-1 on both example.com and secure.example.com. This way you'll be able to track the users when they are moving between example.com and secure.example.com. Please check if you have example.com added to the referral exclusion list in Admin -> Property -> Tracking Info -> Referral Exclusion List. You need the domain name added there to prevent triggering a new session when the user is moving between the subdomain and the main domain. Let me know if you have more questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: How to track single domain to subdomain in one view

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Thank you Arnold for this reply. It is really clear.