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
-
Multiple GA codes, one site.
Hi all, Is anyone running two GA codes on one website successfully? My organisation own a number of websites so we used to have one global GA code on all our sites to track global stats, and then we would also have site unique GA on each property to just track that one property. This worked fine, but of late we seem to be getting no data from the globally based code. Obviously, with the site-specific codes we can enter the name for that domain in GA but for the overall code, it is called 'all.com' I'm wondering if Google has now tied the GA domain to the code or if we are doing something wrong. All the codes are the same as they always were but have stopped working. As a stop gap, we have swapped to using Piwik as the all.com code. However, we are then comparing the stats in two different analytics programs so will get a different result. Also, it would be nice to be able to add the all.com to tools such as this to generate weekly reports. Anyone else having GA woe like this? Thanks. Carl
Reporting & Analytics | | WonkyDog0 -
How do I set a filter in Google Analytics?
I want to filter out direct traffic from the service provider msn. For some reason they are crawling our traffic and its throwing off my data. So I want to exclude direct, but only from msn. Would I set my first filter for direct then msn or vice versa? Thanks
Reporting & Analytics | | EcommerceSite0 -
Reported data in Multi-channel funnels in GA wrong?
I'd love to start using the Multi-channel funnels feature in Google Analytics but I have zero confidence in the reported data as it seems to bear no relationship to the standard ecomm reports. To be specific, in August 2013, MCF is reporting the following for email campaigns: Assisted conversions = 20
Reporting & Analytics | | Bluesnapper
Assisted conversion value = £1,405.91
Last Click or Direct Conversions = 14
Last Click or Direct Conversion Value = £369.57 Now switching to the traffic sources report, GA reports for the email campaigns revenue was £1,226,41 over the same period across 21 transactions. My interpretation of this is that the email campaigns were the "last-click" and delivered £1,226,41 and 21 "conversions" (as I have no goals configured in this GA view, conversions = transactions I believe) That leaves the MCF last-click report short by £856.84 (£1,226,41 - £369.57) I can see no reason why this should be so unless I'm not interpreting the data correctly! Anybody have any suggestions/ideas as to what's going on? Any help appreciated.0 -
Show item status in GA - LIve vs sold vs unsold
Hi guys, I am working with SEO for an auction site with B2C and C2C. (similar to eBay) All item\products on our page have an unique url. The auction can last from hours to weeks.
Reporting & Analytics | | helgeolaussen
When the item is live, sold or (finished but)unsold it still has the same url.
So when I take a look at SEO traffic to items in Google Analytics, I can't tell if the item was live, sold or unsold at the time the user landed on the page. Which makes it diffucult to analyse the traffic. Is there anyway I can make GA show the status of the item for the time user landed on it? Best regards, Ceran0 -
Looking for an Automated SEO report Software Solution
Buon Giorno from 4 degrees C mostly cloudy Wetherby UK 🙂 I love Google Analytics but I'm bogged down with analytics report writting. I'm looking for a web analytics softeare package that: 1. White Label ie we can brand the reports up
Reporting & Analytics | | Nightwing
2. Bespoke ie i can pick and choose what I report on
3. Automated ie I can set a time & date when the client receives the report. Any recommendations appreciated 🙂 Grazie tanto, David0 -
Having issues with pivot tables in GA
For the past three days, I've been trying to use pivot tables on a couple of reports, most importantly I'm trying to use a pivot table on the All Pages report. I'd like to pull it for a year so I can see what our traffic sources are for top pages. I keep getting an error in Google Analytics that says, "Resource is Not Available. Please Try Again Later." See attached image. I've condensed my date range to a month, just in case a year's data was too much and I still get the error. I'm unable to use pivot tables in ANY report, without getting this message. Is anyone else having issues?EgZ25
Reporting & Analytics | | Aggie1 -
If I am changing my domain for my website and want to keep using the same Google Analytics account to keep the data from the old domain. How should I proceed?
If I am changing my domain for my website and want to keep using the same Google Analytics account to keep the data from the old domain. How should I proceed? Do I have to start a new Google Analytics account for the new domain? If so how do I keep the old data? Or can I use the same GA account? Thank you.
Reporting & Analytics | | brianhughes1 -
Why does this domain never pass 150 organic visits from Google?
Hello, The domain http://bit.ly/fwTEsT has been out there for one year, it has about half million indexed pages. We made a lot of changes that could affect SEO and I don't know if Google likes it but the one thing it's sure is that in one whole year the organic visits from Google never got pass 150 visits per day. We've got about 2000 PPC visits but organic don't go up. I'd like to know what our main errors would be so we can focus more on fixing them. Thank you, Alexandru.
Reporting & Analytics | | elwebmaster0