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
-
Funnel Problem in Google Analytics - Please help
Hello, I did set up a several funnel steps in my analytics account to get the funnel visualization report. But it's look fishy, something's clearly wrong that it shows only 10 visitors at the first step but actually more than 5k visitors has visited first goal page and followed through the another all steps. Everyday we are receiving 5k to 10k goal conversions but it not showing in the entire funnel steps through first step to last step. Please see the attached screenshot URL for funnel setup (Admin) and funnel visualization report comparing last two months traffic. Total goal conversions received 3,605 in last two months but in funnel chart (report) it showing only 2% conversions in last step. Anybody can tell me what is the problem with that or analytics not tracking properly?si65Y
Reporting & Analytics | | flightcentre200 -
All goal conversion in Google analytics showing under referral
Hi All, I have switched my website from http to https After switching from http to https all goal conversions in Google analytics showing under referral.I have also updated the GA code for https. Please help me out to fix the issue. Thanks
Reporting & Analytics | | Alick3000 -
Track subdomains in the same analytics property/view
Hello to everyone, this is my first question (kind of a newbie here :-D). I have a website that spans over 4 subdomains + the main domain and I'd like to have a place where I can see the total page views, events and goal completions. Main domain is langhe.net, and subdomains are eventi.langhe.net, servizi.langhe.net, shop.langhe.net, about.langhe.net. The website is based on wordpress and I'm using google analytics for wordpress by yoast as analytics plugin. The configuration of the plugin is as follows: all the website have the same UA-XXXXXXXX code The Subdomain Traking field (setDomainName) is filled with .langhe.net Cross-Domain tracking is enabled Cross-Domain Primary Domain (setDomainName) is langhe.net Cross-Domain Tracking, Other Domains field is filled with: about.langhe.net, eventi.langhe.net, servizi.langhe.net, shop.langhe.net. In the GA property I've created an Advanced Custom Filter configured this way: Field A -> Extract A = hostname (.*) Field B -> Extract B = request URI (.*) Output To -> Constructor = request URI $A1$B1 Field A Required: yes Field B Required: No Override Output Field: yes Case Sensitive: no I was wondering it this is the best way of doing it, or if there are other "best practice" ways to obtain what I'm looking for (for example with this configuration it's become quite difficult to separate the traffic sources for each website). Thank you in advance 🙂
Reporting & Analytics | | Enrico_Cassinelli
Cheers!0 -
Google Analytics - Still Seeing Keyword Data
Hi, I hope you can answer this question for me, obviously I'm aware of the changes regarding "not provided" in analytics however I am still getting keyword referral data in analytics (not much of course!) in the section Acquisition>Keyword>Organic Can anybody explain why I am still seeing organic keyword data even up until yesterday for the odd term? I cannot find an answer anywhere!!! Many thanks
Reporting & Analytics | | splendidapple1 -
Goal in Analytics - mulitple sources for the destination?
Hello, guys. I am trying to find information without luck for my case - I have a contact form, which is placed on many inner pages (about 40). My question is - how do I make a Goal that has simultaneously all the different sources at once (as steps probably) - because there is a max limit of goals, and because analyzing them separately will take much time. When a form is submitted, a /thankyou//?recordid=0d53415b-3e6b-4a32-add7-1586a4737a89 (or similar URL) appears.My guess is that I use a regular expression of ^/thankyou as a Destination, but I do not know what to write in steps. Thank you all in advance, I hope I find a solutions of this annoying problem..
Reporting & Analytics | | petbiv0 -
Mobile Site on Google Analytics
Hi mozzers, We just launched a mobile site and I was wondering what are the main steps to follow for gettting your mobile site tracked via GA (m.example.com)? We have a profile for www.example.com GATC: javascript or PHP to install? Should the profile be on a subdomain? What else to consider when implementing a mobile site on GA? Thanks
Reporting & Analytics | | Ideas-Money-Art0 -
Google Analytics - In-Page Analytics
I had a strange thought waking up this morning, and was curious to hear other people's opinions on it. In Google Analytics, under Content > In-Page Analytics, Google shows what links on your site pages get clicked and how many times plus other metrics. Do you think they use that data for ranking back links so-to-speak? What I mean is, say I had a back link to my site on example.com, and example.com had google analytics installed. Google can see through google analytics whether my link has been clicked on. Say that my link gets no clicks, do you think that Google would use that metric against my site deeming it "not popular" or "not a good resource", even if example.com was a very popular site? And it could work the other way. Say my link got thousands of clicks on example.com, do you think that Google might use that to promote my site? I couldn't find any other discussion on this anywhere, so am not sure if people have already thought about this.
Reporting & Analytics | | THB0 -
How do I find backlinks and/or SERPs for a subdomain
I realize this is probably a very basic question but if I want to find backlinks to a sub-domain of my site, how would I do that? Also, if I wanted to see what search terms were bringing traffic to one specific page of my site, how would I do that?
Reporting & Analytics | | aarnswife0