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
-
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 -
Search traffic hit after switching magazine to subdomain
Hi there, I'm fairly new at all of this and would appreciate any help with understanding why our website has taken a hit in traffic. We curate an online magazine, which was previously accessible through: forensicoutreach.com. It was receiving about 2,000+ unique visitors per day up until a week ago, when we changed a few things. However, the magazine doesn't reflect what our business does, so we created a product-focused web presence on forensicoutreach.com, and moved the magazine (which everyone loved) to library.forensicoutreach.com (DA 37, PA 1). We thought separating the properties was a good idea, but now I'm not so sure. Our traffic on library.forensicoutreach.com is 1,500 (so 500 less than usual!) and our main property has about 56 unique visits a day. It's pretty substantial. A few questions: 1. If we move the library to forensicoutreach.com/library, will that make any difference? 2. Where did we go wrong here and how can we fix it? Any help would be appreciated. Thanks.
Reporting & Analytics | | shivaniseos1 -
How do I track a primary domain and a subdomain as single site in Google Analytics?
Our website consists of a primary domain (marketing focused) and subdomain (ecommerce platform). The two sites look and function as one site even though they are using different technology. I would like to track the primary domain (example.com) and the subdomain (shop.example.com) as a single site in Google Analytics. The subdomain will be set up with GA ecommerce tracking as well. Can someone provide an example of the GA snippet that each would need?
Reporting & Analytics | | Evan340 -
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 -
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 -
Tracking Subdomains without access to Primary Domain
Hi, I have look after mutliple sub domains on a website and want to implement GA sub domain tracking across them. I do not have however have access to the primary domain as thats controlled by a larger organisation. I'm wondering how to set this up so it tracks correctly? Do I set the domain name in my property to the primary domain, or the main subdomain? For example I have test1.example.com (which is basically a homepage), test2.example.com, test3.example.com and test4.example.com which are various sections. As stated, I don't control the root example.com so Do I use setdomainname test1.example.com in the tracking code or setdomainname example.com. Apply filters etc and then setup profiles for each subdomain? Hope this makes sense. Thanks.
Reporting & Analytics | | breaktheseal0 -
Subdomains and SEO - Analytics & Webmaster Tools Setup Help
Any advice on the following greatly appreciated: How to get multiple subdomain data into 1 Google Analytics profile? Can we get multiple subdomain data into Google Webmaster Tools (and if so how?) or do we need to set GWT up per subdomain?
Reporting & Analytics | | AndyMacLean0 -
Tracking visits who entered the site via subdomain in GA
Hello, Does anybody know how I can segment visits who entered my site via subdomain? For example: I want to know people who entered via subdomain.example.com/***** and not include people who entered via www.example.com Thanks in advance!
Reporting & Analytics | | A_Q0