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
-
Domain change from .co.uk to .com - do you add .com to the referral exclusion in GA?
Hi Mozzers, Just wanted to double check that when a website domain changes from .co.uk to .com - do you add .com to the referral exclusion in GA? Do you also keep the .co.uk version in the list too? I have updated the property settings to .com Thanks Anthony
Reporting & Analytics | | Tone_Agency0 -
How to filter out traffic from subdomain using regex?
Hi There, We have a test server that lives on a subdomain which we'd like to filter out in Google Analytics. We're using the hostname filter but are having trouble understanding the regex needed, we're using this as the filter pattern: .domain.com. Will that work? The profile is new so we can't test the pattern. Any pointers in the right direction would be much appreciated. Cheers Ben
Reporting & Analytics | | cmscss0 -
.com site referral traffic to ccTLDs
We have 7 international domains set up along with our main .com site. All of the ccTLds are showing their main referral traffic as coming from the .com site in GA, and most of those being from mobile. Each site is set up correctly with geo-targeting and hreflang tags. Has anyone experienced this before?
Reporting & Analytics | | ggpaul5620 -
Weird referral data. Spam?
Hi all, a few of my sites are suffering from referral spam. I read a couple of articles here on how to exclude them from your traffic using htaccess but today I was going through some referral stats of the company I work for and I noticed a lot of referral traffic coming from prod2.ssosecure.com I didn't find any article telling me this is spam, so it could also be an intranet of one of our clients where they are sending their employees to our application. Anybody a clue what this could be?
Reporting & Analytics | | jorisbrabants0 -
Does "not provided" affect the referral traffic data?
There is a discrepancy between what an referring site is showing as clicks back to my site versus what Google Analytics is showing. For example - They are stating that their site sent 100 clicks to my site. The GA data shows 25 referred clicks from that site. Could this be due to the "not provided" that hides most of the keyword data?
Reporting & Analytics | | devonkrusich0 -
Is Google doing anything about the spam referrer plague in Google Analytics?
My client manages 15+ websites and we have observed the spam referrer issue has gotten steadily worse and worse in the last few months. I took the time to weed out the worst offenders via traffic filters but our referral traffic source garden was quickly full of weeds again a few weeks later. Does anybody know what the Google Analytics development team is doing to combat the spam referrer issue? I find it quite amazing that Google goes through the asinine effort to block out organic keyword data ("not found" & "not provided) but they don't seem to care about blacklisting/filtering spam referrers. RHnE6Wx
Reporting & Analytics | | RosemaryB3 -
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 -
Paid Search Referral
I have a brand new site with a paid search referral in my G&A, but we are not running any adwords or any paid marketing for it. The referral is "not set" so I do not know where it is coming from.
Reporting & Analytics | | KJ-Rodgers0