Setting up GA to report on sub domains
-
I've just launched a mobile version of my site at m.mydomain.com.
I could do with a bit of help just checking I've inserted my Google Analytics code correctly though.
I've chosen the sub domain option from settings and pasted the code into both the mobile and the non-mobile version of my sites.
However, am I right in thinking that the setDomain attribute should point to two different domains for example:
_gaq.push(['_setDomainName', 'm.mydomain.com']); (for the mobile site)
and:
_gaq.push(['_setDomainName', 'mydomain.com']); (for the standard site)
Thanks very much for your help!
-
Hey there, any update on this?
If not, I'll be resolving this question.
-
Sorry!
If you're still not seeing any traffic, it's really hard to say without looking at the code. There's likely something wrong in the formatting, perhaps caused by your mobile CMS. In other words, you might have entered the snippet correctly, but when rendered on-page, something goes awry.
Really difficult to say!
Can you access the page in a regular browser? If so, have you tried the Google Chrome Google Analytics debugger? You can see if the _trackPageview is firing, that way. If you'd like, copy the snippet as it appears on-page (via view source) into a reply and I'll take a look (you can remove your domain and UA-XXXX-X account so as not to reveal anything, if you'd like).
Mike
-
Thanks for the reply Mike. Once I've done that, do I need to amend anything else? I'm only asking as I'm not seeing any hits on my mobile site since implementing the new tracking... Cheers,
-
Nope, the second _setDomainName line should be on both subdomains. That's all that's really required to enable proper subdomain tracking nowadays.
Optionally, you can add the _setIgnoredRef line just before the _trackPageview:
_gaq.push(['_addIgnoredRef', 'mydomain.com']);
-
Just wanted to give this a quick bump - any ideas?
Thanks,
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
-
What's more accurate? GA queries data or Moz/SEMRush keyword data for rankings
What do you guys think? What's more accurate? GA queries data or Moz/SEMRush keyword data for rankings? Any thoughts appreciated.
Reporting & Analytics | | znotes0 -
Days to transaction - GA
Hi We have noticed a trend with days to transaction being high for May - June for Organic for 28+ days. Does anyone have any helpful articles or ideas on why this is happening for organic?
Reporting & Analytics | | BeckyKey0 -
Landing pages report - Meaning of clics metric
Hi there, I am looking at the landing pages report on Google Analytics, I see 4 columns: Impressiones Clics Average position CTR Regarding the clics metric, this shouldn't be equal to the sessions of organic traffic that you get? In Adwords, a clic is a session. What I see is that clics are not sessions and I am a bit surprised of this. Why are they different in this report? Thanks and regards Thanks and regards
Reporting & Analytics | | footd0 -
No paid conversions shown in GA Multi Channel Funnel
For some reason paid conversions are not showing in the Multi Channel Funnel and nothing shows under the adwords tab. What would be the reason?
Reporting & Analytics | | jbk3650 -
Domain redirect for direct mail (source) tracking in Analytics?
We have a client that would like to do some direct mail marketing and the plan is to use a short/simple domain in the marketing materials, which redirects to the main site domain. By default this would show as a referral traffic source in Analytics, right? So any traffic that came through that redirect would be attributed to "shortdomain.com / referral"? Meaning I wouldn't need to do any sort of customized, advanced tracking set up to track conversions that I've already set up (ecomm and goals) and attribute them to this new source? Just double checking that I'm not overlooking something. Thanks!
Reporting & Analytics | | VTDesignWorks0 -
Google Analytics - Cross Domain Tracking Goals
Hi guys, looking at the best way to organize this - Site 1 - Shoe Store - (Old site with analytic history - UA-12345-1) Site 2 - Clothing Store - (Brand New UA-54321-1) Right now i have 2 separate GA Accounts for the sites. But i would like to track goals from Site 2 to Site 1. For that i need to set up cross domain tracking. So i take it i would need to create another account under Site 1 - (UA-12345-2) and put that new code on Site 2? Or do the UA numbers have to be exact? example both 12345-1? In which case, i would need to set up 2 different profiles with filtering? Main concern is i want to keep separate data for both sites, espically if UA's will be the same. Trying to visualize - UA-12345-1 Profile 1Shoes/Master Profile 2 Shoes Profile 3 Clothes Or UA-12345-1 Shoes UA-12345-2 Clothes Thanks, Mike
Reporting & Analytics | | IsHot0 -
Setting up Google Analytics default URL
If someone has set: the default url in Google Analytics to a non-www address (http://mysite.com) then placed the UA tracking script from that GA account within the CMS framework of the website... ... and then set the permanent 301 redirect in the htaccess file to redirect to the www address (http://www.mysite.com). How less accurrate will my GA analytics measurements be considering the default url within GA is non-www and the permanent 301 redirect in htacess is to the www-address? Anyone know how reliable GA reports are until the default url in GA analytics is changed to match what is the redirected url in htaccess file? _Cindy
Reporting & Analytics | | CeCeBar0 -
On what report do I get to know where do the external links come from?
I need to get a list of the external links. I don't find that report, where do I get it?
Reporting & Analytics | | carloscontinua0