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
-
Tracking goals on a subdomain with traffic coming from main domain subfolders. Mission Impossible?
Hello guys, I'm facing a huge challenge setting my goals. Here is the situation. I'm having the same Universal Analytics code on my main domain with different languages www.example.com/en/, www.examples.com/fr/, etc and my www.shop.example.com subdomain. So a French user will go to www.example.com/fr/, see a product that want's to buy and after the registration will see a thank you page on www.shop.example.com/success.html, and here comes the problem. My goal URLs are not "fired" with my filter. I have set up a filter (attached) to include traffic only for the desired profiles, but when this filter is on I can't see conversions. When the filter is off I can see conversions but for all languages. Any ideas how to set up the filter properly? Thank you! Filter.png
Reporting & Analytics | | peternachevat0 -
New GSC Search Analytics report: position mixes web and image
Dear all, I am auditing a site in Google Seach Console (GSC, formerly Google Webmaster Tools) and find the Position data in the new Search Analytics report very, very improbable. I suspect that even if you filter by "SearchType = web", the Position data does count the ranking of images in the Image search widget as a search position. Has anybody observed this as well? Here is the case: the site targets a quite broad search query in the bath room domain. I have made a number of searches with private browser sessions, different browsers, alternative IP address via a VPN, etc, and the look of the search result in the relevant geographical market is consistently the following. Three Adwords ads #1 organic result Images universal results widget #2-10 organic results The site’s first page ranks consistently around #15 of the organic results, hence on the second SERP. But it also consistently has an image in the Images universal results widget (usually #2 or #3). This is consistent with the data I have in Moz Analytics. Yet, the GSC Search Analytics report shows 2.2 as average position with the default SearchType=Web setting. I have done the search over and over, and never has a PAGE of the site ranked that high. Is there any public information how exactly the position is calculated? I mean, something more precise than the very general information on https://support.google.com/webmasters/answer/6155685?hl=en Is there any way to get the correct position/ranking? Thanks for sharing your experience!
Reporting & Analytics | | QRN0 -
GA Regex Help Needed!
Hi mozzers, I am just discovering the RegEx world so I need your help. I would like to create an advanced segment to track 40 specific pages that have very different URIs from each other. Can you tell me how using RegEx? The dimension would be "landing pages" then not sure... Thanks
Reporting & Analytics | | Ideas-Money-Art0 -
'Search Queries Report' in Webmaster Tools Question
Hi, How much do you use the search queries report in webmaster tools to research current rankings/movements? It does look like a great tool but the data doesn't seem to be spot on. For example a keyword over a week might have flux in position so lets say 6.0 then 9.2 for 3 days then back to 6.0. But I check the serp's for this keyword everyday and didn't see any movement?!?! Is this a good tool for you?
Reporting & Analytics | | activitysuper0 -
Has anyone noticed a dramatic drop in direct visits year over year in GA across multiple sites?
I monitor about 10 websites in GA. Many of these sites are in a stable phase of their lifecycle. I've noticed this year that direct visits on all my sites and even friends sites have dropped by 20-60%. Has anyone seen any explanation for this or noticed this when compared to previous year? In every instance I have no penalties, notices, anything and the drop is made up completely of "direct visits".
Reporting & Analytics | | bradwayland0 -
Difference between page/domain authority
could anyone explain the difference between Page Authority and Domain Authoity to me or give me a link to a site where it is explained? Sorry if It's really obvious and I'm just too stupid to find out, but I've searched and haven't found anything.
Reporting & Analytics | | mtueckcr0 -
How can I see the history reports?
Hi, I want to see the history reports for my ranking. For example I can how my website traffic changed in past few months using Google Analytics but I am not able to monitor the performance of my keywords on seomoz. Is there any way to do it?
Reporting & Analytics | | ashish2110 -
Creating a Filter in GA to track Parent Category
I don't know if the title makes sense, but here's my question... Our newspaper website has multiple categories like World, Sport, Entertainment etc. Now, a story, belonging to the entertainment section maybe published on the entertainment page but is likely to have a slot somewhere on the Home page as well as other pages. The same goes for stories in sport etc. However, the url displays the date folllowed by the post title and thats it, no category name. Now, a user may end up going to a detailed story that belongs to the entertainment section (from the home page or any other page) without actually having visited the entertainment page. However, for tracking purposes, we want to see how many hits we got on the entertainment page and any story belonging to that particular section. So, my question is how do I go about creating filters that can help me track category page and detail story hits as one? Or, should I ammend the url structure (keep in mind we are using wordpress for our news website) to include category after the date and would this solve my problem of tracking? I asked a similar question recently but maybe I did not explain myself clearly. Thanks!
Reporting & Analytics | | RishadShaikh590