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
-
Was Google Analytics and Adsense Down Today?
For the last 4 hours of so we were registering zero users and Adsense reporting has not changed. We checked the site, and there were no problems. It seems for some reason there was no reporting. Just now it came back up and we are showing live traffic. Trying to figure out if this was a problem specific to us or if it is on Google's end. Thanks,
Reporting & Analytics | | akin670 -
How to set goal in Google Analytics that required specific page
So our company has new page that has just implemented (let say "page x" --> not a landing page) and we want to see how many visitors that through "page x " convert into the goal (let say "page y"). If I just make the goal destination like "/page y" the goal number that appear is ALL the visitors who reach "page y" (through or not through "page x"), so how I set the goal setting to only show the visitors who reach "page y" through "page x" ? Thank you
Reporting & Analytics | | ddspg0 -
Goals tracking across subdomains
Hi all, I'm having some trouble with regards to setting up goals tracking in Analytics across subdomains and was hoping that someone could help me out. Okay I work for an insurance company and we use a Quote & Buy portal for our insurance policies. Our website - www.example.com sends the traffic to quotes.example.com. Both of these sites have the same Google Analytics tracking ID. The quotes.example.com has no duplicate URLs which appear one our website, therefore I only set up the account to only include the hostname for each. Does this sound correct? The goals issue is if I now set up a goal in the quotes.example.com account, someone comes to www.example.com via Google and then clicks through to our journey and completes, will this count as a referral from www.example.com or as a goal from Organic? I'm totally stuck so any help would be appreciated. Thanks Ben
Reporting & Analytics | | Markerstudy0 -
Google Analytics Average Position
I'm looking at Google Analytics -> Acquisition -> Search Engine Optimization -> Queries reports. I'm looking at keywords and the average position. What Google reports and what I see in a Google incognito search is different (usually my search is much lower). For example, for one search term, Google reports 5.8 average position and every time I search it is 8. My local result is 4. Anyone know why this is? I'm wondering if Google is averaging the Local results into number?
Reporting & Analytics | | CalicoKitty20000 -
A couple of [daft] analytics questions
Hello Mozzers, I have a couple of anaytics questions I wanted to ask. What does 'Not Set' refer to? I assume it is when the user has switched off cookies, but was wondering if this is correct or if there were other circumstances that would trigger this? When I look at my reverse goal paths, the same page is in path 1, 2 and 3... Are the pages refreshing? Thanks! Amelia
Reporting & Analytics | | CommT0 -
Re-classifying a Traffic Source in Google Analytics
Hey All, I think it's inside of the Admin section of Google Analytics, right now I have a traffic source from the domain of indeed.ca that is being classified as Organic traffic when it should be classified as referring traffic, how can I tell Google Analytics that all traffic from this source should be classified as referral traffic and not organic traffic? Furthermore, after I make this change, will Google Analytics re-classify my past data so I can do a proper analysis? I can't remember how to do this and any help would be appreciated! Thanks!
Reporting & Analytics | | EvansHunt1 -
Subdomain tracking codes on subdomain and not root
Afternoon all. I’m pretty sure this is going to be fine but I thought I would seek some confirmation before I action anything. We have a blog subdomain on our site, I have just noticed that the entire blog (built in Wordpress) has no analytics tracking code on it. As this is built in Wordpress I have just logged in on an admin account I think people forgot I had and added the code to the header section as it is a two second job. My question is this – On the main account, subdomain tracking has not been turned on, so the root domain has not got the additional _gaq.push(['_setDomainName', 'rootdomain.co.uk']); line of code in it. I have included this on the blog.rootdomain.co.uk code as is necessary to enable tracking. Will this work or cause tracking issues? I think it should be ok. I don’t want to have to update the root domain code if I can avoid it as that will need to go through the development team and may take weeks as they are swamped and under resourced. Thanks, Rich.
Reporting & Analytics | | Sarbs0 -
X2 Google Analytics affect page rank ?
Hi there, If you had 2 Google Analytics Accounts one to the main site and another to the blog, could this affect the page position in Google? We've suddenly noticed a drop in our KWs and it was shortly after we added another Google Analytics Account. The blog has 68% Bounce rate and the main site has always been about 48%. Any help would be much appreciated. Many thanks Paul
Reporting & Analytics | | webdesigncwd0