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
-
How to set and understand behavior flow in google analytic?
Hello Experts, How to set and understand behavior flow in google analytic? I have attached screenshot of my behavior flow it is showing not set. So how to set? Thanks! MAQnG SQ7QM
Reporting & Analytics | | micey1230 -
Query on google analytic event report and customized report - Please help.
For my site I placed Black Friday offer.Now I have highlighted one product at homepage banner and tracking that with event. I am sharing with you actual figures of 1 day from Google analytic. Your proper response on this query will really really really helpful to me for understanding google analytic deeply and properly. So pls give your precious time for answering me, I will be thankful to you from bottom of my heart. I am checking event report from behavior, following is report for by that product event - Sessions - 30
Reporting & Analytics | | pragnesh9639
Unique Events - 30
Total Events - 34
Ecommerce Conversion Rate - 3.33% I am checking now report from All pages via Behaviour section - Page views - 97, Unique Page Views - 62, Entrances - 7, Bounce Rate - 57.14%, %Exit - 17.53% Now I create customize report for the same by adding
session -7
Ecommerce conversion rate - 0
unique events -4 MY query - when I added session in customized report then it is different from Event session why (7 and 30) ? same way Ecommerce conversion rate in customized report showing 0% why ( 0% and 3.33% ) ? same way unique events 4 and 30 ? do you suggest what is the best way to analysis such page or what will be best customize report for such analysis? Thanks0 -
Want to set up many goals in GA
Hi there, I have been reading about setting up goals in Google Analytics. There is a 20 goal limit, but I have many goals that I want to track (basically I have many thank-you pages that I would like to track). What is the best way to go about setting up more than 20 goals? Thanks
Reporting & Analytics | | Amr-Haffar0 -
Will 301 redirects (Same Domain) show as referral traffic in Analytics?
For an eCommerce site we have 301'd legacy product pages to new product pages. Is all that traffic going to show up as referral traffic from our own domain in Google Analytics? If so, is there any way to preserve original source/medium info or will all the source/medium info be our own domain since there is a 301 redirect?
Reporting & Analytics | | bozzie3111 -
Setting up Google Analytics for Subsites
I currently have one main .com site and am planning on launching geo-location subsites .co.uk, .com.au, .ru, etc... Traffic will flow between both sites and some of the content on the subsites will be duplicate and therefore include a canonical tag to the main site. I want to set up GA to capture who is going to the subsites and vice versa and correctly capture crossover traffic. Any advice on implementing advanced analytics directly (or links to sources that will direct me the right direction for this project)
Reporting & Analytics | | theLotter0 -
(not provided) in GA
Hello, Google is displaying (not provided) for signed in users. Is there any workaround for this ? Any advanced segment by which can know more about such traffic ?
Reporting & Analytics | | seoug_20050 -
Should you get a new Google Analytics account if your site has a new domain after a site redesign/new development?
We recently developed a new site for a client and they have opted to move forward with a domain change. Should we create a new Google Analytics account for the new site?
Reporting & Analytics | | TheOceanAgency0 -
Sub-category considered duplicate content?
Hello, My craw diagnostics from the PRO account is telling me that the following two links have duplicate content and duplicate title tag: http://www.newandupcoming.com/new-blu-ray-releases (New Blu-ray Releases) http://www.newandupcoming.com/new-blu-ray-releases/action-adventure (New Action & Adventure Releases | Blu-ray) I am really new to the SEO world so I am stuck trying to figure out the best solution for this issue. My question is how should I fix this issue. I guess I can put canonical tag on all sub-categories but I was worried that search engines would not craw the sub-categories and index potentially valuable pages. Thanks for all the help.
Reporting & Analytics | | hirono0