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
-
Fixing Bounce Rate between Domain and Subdomain
Currently, the way our site is set up, our clients generally visit our homepage and then login through a separate page that is a subdomain, or they can read our blog/support articles that are also on separate subdomains. From my understanding, this can be counted as a bounce, and I know this sorta of site structure isn't ideal, but with our current dev resources and dependencies, fixing this isn't going to happen overnight. Regardless, what would be the easiest way to implement this fix witihn the Google Analytics code? EX: If someone visits our site at X.com, and then wants to login at portal.X.com, I don't want to count that as a bounce. Any insight is appreciated! Thanks
Reporting & Analytics | | KathleenDC0 -
Free Media Site / High Traffic / Low Engagement / Strategies and Questions
Hi, Imagine a site "mediapalooza dot com" where the only thing you do there is view free media. Yet Google Analytics is showing the average view of a media page is about a minute; where the average length of media is 20 - 90 minutes. And imagine that most of this media is "classic" and that it is generally not available elsewhere. Note also that the site ranks terribly in Google, despite having decent Domain Authority (in the high 30's), Page Authority in the mid 40's and a great site and otherwise quite active international user base with page views in the tens of thousands per month. Is it possible that GA is not tracking engagement (time on site) correctly? Even accounting for the imperfect method of GA that measures "next key pressed" as a way to terminate the page as a way to measure time on page, our stats are truly abysmal, in the tenths of a percentage point of time measured when compared with actual time we think the pages are being used. If so, will getting engagement tracking to more accurately measure time on specif pages and site signal Google that this site is actually more important than current ranking indicates? There's lots of discussion about "dwell time" as this relates to ranking, and I'm postulating that if we can show Google that we have extremely good engagement instead of the super low stats that we are reporting now, then we might get a boost in ranking. Am I crazy? Has anyone got any data that proves or disproves this theory? as I write this out, I detect many issues - let's have a discussion on what else might be happening here. We already know that low engagement = low ranking. Will fixing GA to show true engagement have any noticeable impact on ranking? Can't wait to see what the MOZZERS think of this!
Reporting & Analytics | | seo_plus0 -
Google Analytics Goals - Different Domain
Hi, We currently need to setup a goal that involves a different domain. Any guidance would be greatly appreciated. more info: the checkout process is redirected to a secure.domain Just let me know if I can provide any additional info that may helpful.
Reporting & Analytics | | opusvo0 -
Does analytics track an order two times by refresh on the confirmation-page?
Hi there,
Reporting & Analytics | | Webdannmark
I have a quick question. Does Google analytics track an order two times, if the user buys a product, see the confirmation page and then click refresh/click or back and forward again?
The order/tracking data must be the same, but i guess the tracking code runs for every refresh and therefore tracks the order two times in Analytics or does analytics know that it is the same order? Someone that can clearify this?Thanks! Regards
Kasper0 -
Google Analytics
Good Morning, I am trying to understand 2 issues in Google Analytics. 1. When look at : Traffic Source --> SEO --> Quesrios - i see the impressions column and its always a whole number 1550, 500, 5500, etc.. I never saw (for example) 702, 313, etc... impressions Can anyone explain why and how does it work? 2. In the same report i see my AVG. position for each query, the question is how come i have AVG, position of (290, 230, 190) for some of the queries and still i get clicks on these queries. My guess is that from time to time these queries have better position and the clicks are from these time. Do you familiar with a way to the the distribution of a specific query over time? for example: 1.3.2013 avg position = 4 2.3.2013 avg position = 7 3.3.2013 avg position = 2 4.3.2013 avg position = 8 etc... 3. This report say its for: "Top 1,000 daily queries" - What does it mean? Thank you and sorry for this long question SEOwiseUs
Reporting & Analytics | | iivgi0 -
Exporting Keywords in Google Analytics
In the old Google Analytics, I would simply add &limit=30000 in the URL. Does anyone know how to export all keywords from the new Google Analytics?
Reporting & Analytics | | TommySwanson520 -
Different metrics in analytics and adwords
Hi. My adwords campaigns and analaytics reports shows me slightly different results. Even for paused or disapproved ads in adwords, the analytics shows me some clicks?! I have automatic tracking enabled. Is it some kind of fault in configuration or its normal? Thank you for answer/link with answer.
Reporting & Analytics | | asystematic0 -
How do shortened links show up in Google Analytics?
Hey, How do shortened links show up in GA? So if I tweet about something and use bitly, does twitter get the referral? I am thinking not. I have never seen bitly show up as a referrer, but we gets lots of clicks from those links. Hmmmm. Anyone? E
Reporting & Analytics | | ErinTM0