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
Cheers! -
Hi Enrico - welcome to Moz!
Combining subdomains into one Analytics profile is definitely a good way to do things, and totally doable. Have you had a chance to look at Google's guidelines for this?
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite
I know you're enabling this in Wordpress, so you can't follow their guidelines exactly, but it's probably a good idea to make the edits that you've proposed, then look at the code Wordpress puts out and compare it to Google's recommendation.
Then, best practice is to keep the separate profiles you already have running, plus add a profile that combines all subdomains into one profile. Then you don't lose historical data, and you can compare total pageviews of the combined profile to the pageviews of the all the separate subdomain profiles added together to make sure you implemented the new profile properly.
Good luck!
Kristina
-
Hi Cibble!
That's how I started, but now I'd really prefer to have a place with consolidated statistics. It's not just a matter of pageviews counts, but also the webistes are becoming more and more interlinked with each other so I'd like to understand what's the visitor's flow (landing here, then going there etc.)
but thx anyway
-
Hi,
I have many sites that have subdomains and have faced the same problems you are facing. My solution; create a new GA code for each account. It takes seconds to create a new account and even less time flicking between reporting account. Sorry I have nothing insightful to add.
Best,
cibble.
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
-
Analytics no data
Hi I tried to add an analytics script. Google Tag Assistant recognizes the script that was added properly, but I don't receive any data in Analytics. I also have tried to implement the Analytics script with the Monsterinsights plugin, the code is well recognized by Google Tag Assistant, but I don't receive any data in Analytics. What is going wrong here? Website: https://www.dakwerken-vandriessche.be Thanks for your advice! BmRUkFJ
Reporting & Analytics | | conversal1 -
Homepageurl/homepageurl
Hello All, In Google analytic & moz reports our homepage is being tracked as www.example.co.uk/www.example.co.uk. Have checked every where this url does not exist, very confused and worried where this url is coming from. when i accessed this url from address bar it lands on 404 but still in google analytic and moz i can see traffic coming on this url . i spoke with google analytic support they informed me its the home page of the site. To what i know , home page should show as / Any help highly appreciated.
Reporting & Analytics | | tigersohelll0 -
Google Analytics - Average Position
Hi Just trying to get some clarity on Google Analytics Average Positions in "Aquistions/Search Engine Optimisation". For a very competitive keyword Google Analytics is saying i am on average position of 6. Is this Page 6? I am assuming position six would be 1.6?
Reporting & Analytics | | Cocoonfxmedia0 -
Site account in Google Analytics
Hello I have a question about my site account. On 2014, during a week, my ID tracking of Google Analytics was removed of the site, in this period the volume of users and sessions is lower than the other weeks. But I don't understand why are the sessions and users still reporting during this period without ID Tracking
Reporting & Analytics | | Arkix0 -
How can I tell if I am using Universal Analytics?
On my Google Analytics page it says at the top "Upgrade to Universal Analytics Upgrade to get a deeper understanding of your users through new tools and more accurate data." Below that it talks about how to do it. I do not see what they are talking about for "Select an account and a property, then click Universal Analytics Upgrade." But if I can into my change history is shows Changed By-System Property "http://www123.com" started transfer to Universal Analytics processing." This was on May 22nd and it hasn't said anything since. Why does it keep telling me to do it if it already has? It doesn't say transfer complete anywhere so I don't know if it finished or not.
Reporting & Analytics | | EcommerceSite0 -
How would I create this type of report in Google Analytics?
I work for an e-commerce site. I would like to run a weekly report to see what every category pages increase and decrease for pageviews would be. How would I do that?
Reporting & Analytics | | EcommerceSite0 -
Google Analytics Not Tracking 100% of Visits?
Hi all, We're having an issue with Analytics where we are getting different figures from what Silver Pop are saying. For example email campaign A sent via Silver Pop, with Google Analytics tracking code show's 50 unique clicks in Silver Pop. Looking at Google Analytics there are only 10 visits from that campaign. So I thought it could be something with the tracking, but there wasn't a significant rise in web visits = either Google Analytics is not recording visits properly or Silver Pop figures are wrong. I'm more inclined to think that it's something to do with Google Analytics. Has anyone come across something similar? Where one system is showing you X amount of visits but the figures on Google Analytics don't add up? A few quick things already covered: Double checked the links have been tracked properly, but this doesn't explain the low increase in web visits generally We've double checked that Google Analytics tracking code is properly installed (and it is / was at the time of send). Any help would be much appreciated! Thanks guys.
Reporting & Analytics | | RKHStaff1 -
Analytics
Hey Does anyone know of a way to set up a custom report in GA to show year on year data? Ideally even better would be a way to pull data using the excellent analytics plugin but I don't think thats possible at the moment. Any help is much appreciated. Cheers
Reporting & Analytics | | CraigAddyman0