Is Analytics Code for SubDomains different?
-
I am currently tracking site performance on our website with Google Analytics.
Recently, we've brought a Wordpress blog into our site as a subdomain blog.accupos.com. Though we did this a few months ago, we do not have Analytics data for these pages within the wordpress platform.
I've found where to paste the code, in the Footer block of the Wordpress template, just before the close body tag (is this the best recommended way?) and just have one question about WHICH code to paste.
Can I add the original code, same as the rest of the site? Or does Analytics have a different code for tracking subdomains? If so, do I need to replace existing code for the rest of the site?
I hope I worded this okay. Please help. I'd appreciate it!
Derek M.
-
Hi Derek
I checked out the site real quick.
Technically 'www' is a subdomain. So you should have www.accupos.com and blog.accupos (or just accupos.com for the main site).
When Google Analytics says "mutiple subdomains" they mean a website that has a root domain (accupos.com) with more than one subdomain it can load with - in your case it should be blog and www - but somehow you've got what's called a "sub subdomain"
So you should first look into how/why its set up like this and just have blog.accupos.com (without the www) This is something you'd have to likely work with IT or your developer to fix.
Then in analytics you'd select "One domain with mutiple subdomains" and you'd be all set.
-Dan
-
I did see that tool for Analytics code but not sure how it fits together with the following:
When I found the Code Snippet in Google Analytics, there were 2 options, one was for "A single domain" and another variation of the code was for "One domain with multiple subdomains".
So here are my 2 Questions:
Considering our blog is in the subdomain format, www.blog.accupos.com, is this second code more appropriate, especially since we DON'T have MULTIPLE subdomains? (we only have one...www.blog.accupos.com)
If we do use the NEW code for "multiple subdomains", do we also replace the Analytics snippet on all the OTHER pages within the site which are already being tracked with the old code...?
Thanks!
DM
-
Hi Derek
You can use the same analytics code as you do for the rest of the site. It makes sense in this case.
I would recommend using Yoast's Google Analytics plugin for WordPress - this way you don't need to put the tracking code into the WordPress code, the plugin will do it correctly for you.
Hope this helps!
-Dan
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
-
Conflicting numbers in Google Analytics
I am getting 2 completely different numbers in Google Analytics.According to the graph on my Dashboard organic traffic decreased ~40% comparing June 7 -> June 6.However, when I dig a bit deeper and look at the 2 dates specifically compared to each other I get a `3% increase in traffic.When I look at the traffic on just June 7, I get the number indicating the increase.Any ideas or someone getting similar conflicting numbers??
Reporting & Analytics | | theLotter0 -
What's the problem with this code for Google Analytics
Hello, I'm using this code in my thank you page to track ecommerce sales in GA. The problem that I'm having is that in the google event the _trackPageview doesn't register the proper page but puts the url of the ecommerce website. The transaction is properly tracked. Any ideas of what could be the issue looking at this code? Maybe there could be other code could be causing the problem? Thanks a lot.
Reporting & Analytics | | nagar0 -
Google Analytics Not Working
I added the code before tag but still google not showing it is installed. Status: Tracking Not Installed Last checked: Mar 15, 2013 10:38:10 PM PDT Can someone check my domain - www.plugnbuy.com
Reporting & Analytics | | chandubaba0 -
Excluding referral traffic from a specific page Google analytics
Hi, I am trying to exclude from referrals from a particular page i.e. www.domain.com/nothispage within Google analytics, I have tried a couple variations within the advanced filter (Regex etc) section without much luck, could anyone assist ? Updated-trying to do this using a filter for the entire profile. Thanks Marc
Reporting & Analytics | | NRMA0 -
Google Analytics Campaigns
I need the help of a smart Mozzer. In Google Analytics: Traffic Sources>Sources>Campaigns all the results shown are from RSS. Can anyone help me with why RSS results would be displayed in Campaigns?
Reporting & Analytics | | waynekolenchuk0 -
Google Analytics Reports
Hi all , I do not have the skill and time to look into Google Analytics to derive actionable conclusion and inferences. I would like to outsource this activity , just like I outsource link building. But not sure how... Any guidance ?
Reporting & Analytics | | iamnew0 -
In-Page Analytics
Hey folks, In the in-page analytics section of GA I am wanting to get the % of clicks on a particular link over a large selection of dates. Does anyone know how to pull the data without having to do it day by day? Ideally I want to pull it all at once. There might of course be other ways to do this, if so please let me know. Thanks for your help. Cheers,
Reporting & Analytics | | CraigAddyman0 -
Tracking Referring Sources - Google Analytics - Ecommerce
I need some help from anyone that has deal with this issue before.. We are currently running BigCommerce for the shopping cart on chinamist.com. We have enabled e-commerce tracking through Google Analytics and the revenue tracks perfectly. The only issue is that the referring sources are not tracking directly to the revenue being displayed - for the source, all analytics shows is (none). The assumption is that the tracking issue is a result of having a domain and subdomain.. but 'domain and subdomain' was selected when setting up the sites' advanced analytics script. Does anyone have any tips? We've run into a dead end here.. One final note, we're running an Adwords campaign which is showing conversions through the Adwords side of reporting. After integrating the Adwords and Analytics accounts, the analaytics account is still not showing revenue/conversions from Adwords as a source. Appreciate the feedback.
Reporting & Analytics | | Investis_Digital0