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
-
Strange landing page in Google Analytics
Hello MOZ Community, The website in question is https://x-y.com/ When i looked at the landing pages report in GA , x-y.com is appended at the end of every URL like this. https://x-y.com/x-y.com When i open the above URL in GA interface, it shows page not found. This is obvious as there is no such URL.
Reporting & Analytics | | Johnroger
The metrics like sessions, Users, Bounce rate all look good. In the property settings, The default URL is written like this http:// cell-gate.com (Please note that s is missing in property settings). But how is traffic tracked correctly How do i solve this problem. What settings should we change to make the landing pages report look ok Thanks0 -
Two Tracking for Banners - Internal Promotion & Event Tracking -Any Impact on Analytic Figure or Bounce Rate?
Hi All, I have implemented Internal Promotion - https://developers.google.com/tag-manager/enhanced-ecommerce#promo-clicks for my ecommerce site on homepage banners. Along with this I did event tracking for Banner click. So any negative impact of bounce rate or other reports? Thanks
Reporting & Analytics | | Arnold30 -
How to track mobile actions on my website
Hi, i have a website that have, as many others, a mobile version. I want to know if there exist a way to track the mobile user experience, for example, how many times scroll down the page, where touch the screen, and actions that only have sense with mobile visitors. what do you think? Thanks, Juan Ignacio
Reporting & Analytics | | NachoRetta0 -
Two Analytics Code
Hi Moz Community! I've been working with a client’s website and found it has 2 analytics code with same ID. I need to understand which one is correct before removing anyone of them, below are the both scripts. First one Second one Any help would be appreciated! Regards, S
Reporting & Analytics | | ShaunPhilips0 -
% Change - Google analytics - how to calculate?
Hi All,
Reporting & Analytics | | JohnPalmer
I have two dates with two different numbers I want to calculate the "% Change" like google analytics, The numbers of June 2015 - 127,931 sessions
The numbers of June 2014 - 90914 sessions please tell me what is the %Change. Best. J0 -
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 -
Help with Analytics
Afternoon all - I hope someome might be able to help me getting some data out of Google Analytics. I want to try pull a report which will show me both what the last page before a goal completion was and the country that generated the click. Is that possible at all? When I go to look at goals, I can only pull data for the last page before the goal click ... and when I look at my goals in the Pages>Content menu, I can only view country. So is there any way of pulling the two set of data together at all? Any thoughts would be really appreciated. Thanks very much, Simon
Reporting & Analytics | | theshortstack0 -
Google Analytics help - exporting reports
Hey mozzers, A little help if you will. I am in traffic sources > sources > search > organic I am view keywords and comparing 1 month with another. Now I see what 1 keyword sends 1st month, 2nd month and % Change. I want to export this data to an .xls file. When I do, I end up with a file that shows what 1 keyword sends 1st month and 2nd month, but no % Change! I really need to include this in exported document.... Summary: Analytics hates me. 🙂
Reporting & Analytics | | MirandaP0