Subdomain referral
-
Hi,
We have two sites mysite.com and aa.mysite.com. We want to track these sites separately. We created two different properties with IDs UA-XXX-1 for main domain UA-XXX-2 for subdomain.
gaq code for main domain is as following,
gaq code for subdomain is as following,
It works well for subdomain. But we want to see traffic from subdomain to main domain as referral.
What is wrong with the gaq code of main domain?
Do i need to change code or is it enough to inactivate subdomain tracking option in profile settings of main domain?Thanks in advance,
-
If you want to see the subdomain show up as a referral, you need to remove this line of code from the main domain.
_gaq.push(['_setDomainName', 'mysite.com']);
That should be all you need to change.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google Analytics - Referral traffic being reported as Direct traffic
Hi, I have a link on my www homepage to another subdomain website. Both websites are served on https, and have independent Google Analytics properties. However, the traffic from the www site to the subdomain site is being reported as Direct, and not Referral traffic. Any ideas why? See image provided for context... RCn6HER
Reporting & Analytics | | RWesley1 -
Amazon referral on analytics
In the past month, I've received referrals from tt.amazon.com, coming from both Ireland and Germany - it made me a bit suspicious as I haven't seen tt.amazon before and I can't find much online about it. I'm a little reluctant to click through to the website in case it is suspicious... Does anyone know anything about this and should I be concerned? Thanks!
Reporting & Analytics | | RayflexGroup0 -
How to configure multilingual site in google analytic? Currently showing in Referral Traffic why?
Hello All, Currently my Multilingual site is showing in referral traffic is it because I have not added hreflang tag on site? If yes and if I add the hreflang tag on all sites when where it will show in google analytic traffic from international sites? And what type of configuration required in analytic? Thanks!
Reporting & Analytics | | pragnesh96390 -
Referral exclusion not working correctly?
Hi!I've added our gateway payment system to the Referral Exclusion List a few months ago. Nevertheless, it continues to appear as a referral, and obviously taking almost all of the revenue. Does it work for you? Do you know why could it be not working for my website?Thanks for your response!
Reporting & Analytics | | arielbortz0 -
Bing Referral Traffic
We do not get referral traffic from Google, only organic. Why do we get both organic and referral traffic from Bing?
Reporting & Analytics | | Mike.Bean0 -
Referral exclusion not working with GTM?
Hi, how are you?
Reporting & Analytics | | arielbortz
I have my website with Google Tag Manager implemented. Google Analytics is one of the tags I have configured. The problem is that Referral exclusions aren't working for me. I excluded 3 domains, and I keep seeing them in my Referral Traffic report.
Any idea why this could be happening? Best wishes,
Ariel g04tIqv IrzKXiY0 -
Google referral drop after setting preferred domain
Hey all, After doing a lot of research, and verifying here in the forum, I set our site's preferred domain on monday. We had no preferred domain set for years, but we were already redirecting the non www site to the www one. So, it was evidently an oversight. The day after I set the preferred domain (Jan 29) our google referral traffic hit an all time low. Any other thoughts on the cause? Any ideas on why setting a preferred domain would be a bad idea? Our site is www.mnn.com. Thanks!! Lisa
Reporting & Analytics | | Aggie0 -
Google Analytics - Referral Traffic Question
How Google Analytics determine that some particular web site referred traffic if there is no back link on that site?
Reporting & Analytics | | DiamondJewelryEmpire1