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
-
ECommerce Tracking in Analytics - Should I use a plugin or do it manually?
Hi, I have a WordPress site (woocommerce integrated). I would like to know should I use a plugin to enable e-commerce tracking in Google Analytics or I should do it manually with GTM. Which is a better way? Will using a plugin to enable e-commerce tracking slow down my site? Any thoughts? Thanks in advance.
Reporting & Analytics | | Mr.Suren0 -
Vanity URL vs domain URL
Hi guys, Our CEO is having an interview with a known broadcaster on radio. During the interview he will mention a specific URL www.example.com/marketingcampaign that we want track on Google Analytics, therefore behaving like a vanity URL redirecting to the actual URL www.example.com/resources/primary-keyword-2018. Would this work the same way a vanity URL in terms of tracking or not such as following guideline here ? I am asking because vanity URLs are supposed to be completely different domain name that gets purchased and in our case it is the same domain name just with a different URI. thanks guys!
Reporting & Analytics | | Taysir0 -
How to Configure & Tracking Images in Google Analytic?
Hello Experts, Can anyone tell me for my eCommerce site how to configure images tracking in google analytic? And where can I see the image traffic in google analytic? Not sure I am asking correct question but confuse about image traffic. Thanks! Wrights!
Reporting & Analytics | | wright3350 -
Tracking Goals on a Subdomain?
What needs to be done to Analytics to track goal completions on a subdomain? The main Analytics profile is set up for example.com, but landing pages for paid campaigns are set up at sub.example.com. Thank-you page is sub.example.com/thank-you.php What needs to be modified in Analytics (or to the Analytics code) or how do the goals need to be set up to track these subdomain conversions all within the same Analytics profile? They're not tracking currently. Thanks.
Reporting & Analytics | | elcrazyhorse0 -
GA Goal Tracking for Proactive Chat
Hi all, Just wondering whether anyone knows how I'd be able to track Proactive Chats as a goal in Google Analytics? So when someone visits our site, and we proactively contact them by initiating a chat (rather than a reactive chat where the visitor initiates it). Thanks!
Reporting & Analytics | | AdrianCordiner0 -
Event Tracking Not Working
Hey there. Could use some help in figuring on why the event tracking code on this site http://www.baltimoreareahondadealers.com is not working. There is code on all external domain links but none seem to be firing. Inspect all the map links to view code ie. Search New Honda Inventory What am I missing? Thanks so much. -Caryn
Reporting & Analytics | | Caryn0 -
Tracking pages in two separate analytics accounts
Hi All, I'm trying to track some pages on one website in two separate Google Analytics accounts. Has anybody done this before that could help with the tracking code? Thanks in advance, Elias
Reporting & Analytics | | A_Q0 -
What's the best way to track moble traffic / sales from a subdomain in Google Analytics?
Hello, I've been trying to figure out the best way to track traffic and sales for a subdomain mobile site and would appreciate any feedback or guidance. I've set up an advanced segment but have found that I'm not able to source traffic since the segments get disabled when trying to view top content pages. I've also setup an additional sub-profile under the main domain profile in google analytics and have set up an advanced filter using the following guildelines http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html In the Profile Settings page, click the Add Filter link. Choose Add New Filter and provide the filter a name. Choose Custom Filter and select Advanced on the Filter type settings. Under Advanced settings: FieldA should be set to Hostname FieldB should be set to Request URI Set the values for both Field A and Field B to (.*), which is an expression that captures all characters. Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice. I'm unsure if I've set up the profile / filter correctly, the traffic stats are different than the segment. The mobile profile is also tracking all ecommerce transactions instead of just mobile. Here's the code I have in place. we're using the Traditional code Thanks, Jamie
Reporting & Analytics | | marketing_zoovy.com0