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.
-
Thanks!
-
Hey there,
You'll need the setDomainName line to reference the main domain:
_setDomainName, 'example.com'
Put that across all of your subdomains with the same UA account and it'll properly track. Without GA installed on the main domain, however, all visits to the www. will appear as an exit.
Fortunately, clicks from test1.example.com to test2.example.com should properly track and retain referring information.
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
-
Redirecting one domain to another using utm tags
I have two live websites, which have both been live for over 10 years, so we have plenty of backlinks to both...domain1.com & domain2.com. Domain 1 and all urls is being merged into domain2.com. So 301 redirects will be setup for every page of the site....domain1.com/abc-1234/ to > domain2.com/abc-1234/ In Google analytics for domain2.com we want to be able to see which visits we have received as a result of a redirect from domain1.com. It is possible to see these visits that come in via organic, referrals and social etc, as those will come to us with the referral as domain1.com. However, with direct traffic, i.e. if someone types domain1.com into their search bar, these visits will be assigned as direct and we are not able to tell in GA if those users have typed in domain2.com, or domain1.com to get to our webpage. There are some suggestions in forums of adding utm_source tracking to all redirects (and add canonicals to those urls pointing to the non utm_source version), but my concern is that Google is going to have to go through one extra step to reach the page on the redirected domain. So without the utm source code Google will follow this route
Reporting & Analytics | | Sayers
domain1.com/123/ to domain2.com/123/ With the utm source code Google will follow this route
domain.com/123/ to domain2.com/123/?utm_source... then see's canonical, so moves to domain2.com/123/ So essentially I am giving Google one extra step to follow before it gets to the equivalent page on the new site. Is this an issue, and/or are there any other ways to track this redirection without adding extra parameters to the url?0 -
Track PDF's in Google Analytics
Hi Mozzers, Is it possible to track PDF's via Google Analytics/Google tag manager? I'm not only looking for PDF downloads but for the actual activity when someone opens an interactive PDF document. So would it be possible to have onclick events on buttons in the PDF etc... Many thanks!
Reporting & Analytics | | WeAreDigital_BE
Sander0 -
Cross domain tracking Google Analytics
Hi there, Got a question on cross domain tracking: We have a couple of TLD's to serve localized content to our visitors, next to our main .com TLD where our app is running as well in a subdomain. Situation is this: Local sites:
Reporting & Analytics | | jorisbrabants
marketingsite.be
marketingsite.com.br
marketingsite.fr Main site: marketingsite.com
app.marketingsite.com Conversion gets triggered when somebody ends up in app.marketingsite.com/firstuse for example. People can sign up at the local site filling in their email but they end up in app.marketingsite.com/firstuse Reading this article on cross domain tracking I'm getting a bit confused on the setup of the tracking code itself. The sample code provided shows these two lines: ga('require', 'linker'); ga('linker:autoLink', ['maindomain.com','targetdomain.com']); Now the question 🙂 Is it correct when I think that maindomain should be replaced with our local TLD's on every one of those, and that targetdomain is where the conversion happens? In this case the .com site?0 -
Alternative domains redirected with 301 to the main domain
Hi everyone I've got a website which gained a Panda penalty back in March 2012 which was because of the implementation of a range of spammy practices (keyword stuffing in titles, indexed category and tag pages, duplicate domains). I've fixed the titles and deindexed any pages that could be seen as thin or duplicate so I'm confident that any onsite Panda issues have been fixed. As mentioned above the client had also created over 40 alternative domains to the website and pointed them to their main website folders (hence duplicating the website and content 40 times over). These domains have now been redirected via 301 redirects to the main website to ensure that any links they have gained are captured. The reason for the redirection is that we initially took the domains down and saw a drop in traffic and this seemed to be the most likely reason. While Moz and Majestic are not showing any significant links to these domains (which is why they where originally taken down), past experience has told me that these tools don't always pick up all referring domains. Primary domain workingvoices.com 5 Example Alternative Domains presentationskillslondon.com workingvoiceslive.biz workingvoices.co.uk livingvoices.co.uk working-voices.net Question 1: At the same time we took down the alternative domains (and experienced the drop in traffic) we removed duplicate instances of Google Analytics code from the webpages. All the guidance that we could find stated that duplicate instances of code shouldn't affect your Analytics numbers, hence we assumed it was the taking down of the alternative domains, but maybe the guidance we found was wrong? Question 2: It is 3 months later and these alternative domains are still indexed by Google, and Panda hasn't run since October 2014 so we haven't experienced a recovery yet. Redirecting the domains will remove any issue of a Panda penalty, but now of course I am worried about Penguin - the last thing I want to do is trigger that can of worms! This whole saga has been pretty complicated and I think I need some fresh sets of eyes. What does everyone think? Could the initial drop have been due to the duplicate Analytics code being removed? Could the redirecting domains trigger Penguin? Should we take the alternative domains down and be done with them? Any other thoughts! Looking forward to hearing your opinions! Damon.
Reporting & Analytics | | Digitator0 -
Pairing webmaster tools with analytics - user access
If you pair webmaster tools with an analytics account does this auto allow access for any of the authorised analytics users or do they have to be granted access individually from within GWT ? cheers dan
Reporting & Analytics | | Dan-Lawrence0 -
Image Search Keyword Tracking With Google Analytics
Does anyone know how to track keywords for your images in Google, Yahoo, Bing (/imgres)?
Reporting & Analytics | | Melia0 -
Custom Variables to track Vimeo plays on website with Google Analytics?
Hello Everyone, I'm trying to track how many times a Vimeo video is played on my site via GA. Does any of you have any knowledge of how can this be achieved? I've read the documentation and came up with this: After the iframe embed i insert this: Of course the GA is loaded in the header. Does not work, at least i cant see anything in analytics. I have set up the segment as per the attached image. Thanks in advance! Alex E6XnO.png
Reporting & Analytics | | pwpaneuro0 -
Spider 404 errors linked to purchased domain
Hi, My client purchased a domain which based on the seller "promising lots of traffic". Subsequent investigation showed it was a scam and that the seller had been creative in Photoshop with some GA reports. Nevertheless, my client had redirected the acquired domain to their primary domain (via the domain registrar). From the period on which the acquired domain was redirected to the point when we removed the redirect, the web log files had a high volume of spider/bot 404 errors relating to an online pharmaacy - viagra, pills etc. The account does not seem to have been hacked. No additional files are present and the rest of the logs seem normal. As soon as the redirect was removed the spider 404 errors stopped. Aside from the advice about acquiring domains promising traffic which I've already discussed with my client, does anybody have any ideas about how a redirect could cause the 404 errors? Thanks
Reporting & Analytics | | bjalc20110