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 / Funnel benefits to account creation at end of steps?
I'm working with a client that has a number of paths for users to take (demand vs. supply, a lot of variables, etc). All involve new URLs and are perfect for destination-based goals and thus the creation of funnels; however, right now most are irrelevant due to some issues involving redirects, changed paths, etc. In the process of trying to make sense of them, I discovered that the site forces you to make an account before proceeding through the steps in the funnel. Are there any resources that might indicate the best to approach situations like this - that is, account creation at the beginning (and as a requirement before proceeding) to creating an account at the end? I'm trying to make sense of all their potential paths, but it's impossible without making countless accounts. Thanks.
Reporting & Analytics | | Alces0 -
Will changing the property from http to https in Google Analytics affect main unfiltered view?
I set my client up with an unfiltered view in Google Analytics. This is the one with historical data going back for years, so I don't want to do anything that will affect this view. Recently, the website moved from HTTP to HTTPS. There's a setting for the property that will allow me to change the property name to https://EXAMPLE.com and change the default URL to https://EXAMPLE.com. Questions: 1. If I change the property name and the default URL, will this somehow affect my unfiltered view in a way that I'll lose historical data or data moving forward? 2. I have heard that changing the default URL to HTTPS will help me avoid a common problem others have experienced (where they lose the referrer in Google Analytics and a bunch of their sessions go to direct / other). Is this true?
Reporting & Analytics | | Kevin_P3 -
Conversion analytics goals
Hello, I have to configure my analytics goals for my SEO estrategy. In Google Analytics I can choose between: destiny, duration, Pages/screens per session and event. But I don't have the best criteria for select each one. What are the best options for a content site and for a e - commerce? Otherwise, I wanna know which is a good bounce rate for a content site? And what is a good Avg. Page Load Time (sec)? Thanks in advance.
Reporting & Analytics | | Arkix0 -
Funnel Visualization in Google Analytics
Hello. I have a question about funnel visualization in Google Analytics where there is an eCommerce goal (i.e. add to cart, shipping, purchase) with the first step being mandatory. Issue:
Reporting & Analytics | | Unity
The amount of completed purchases reported in GA doesn't match the actual transaction figure via the eCommerce platform. Question:
I was wondering if anyone knows why this occurs? I have a few ideas on why however I haven't been able to locate any supporting evidence. So I was hoping to generate a few ideas from the SEOMoz community to help me investigate further. Any ideas welcome! Much thanks,
Davinia0 -
Setting up Google Analytics for Subsites
I currently have one main .com site and am planning on launching geo-location subsites .co.uk, .com.au, .ru, etc... Traffic will flow between both sites and some of the content on the subsites will be duplicate and therefore include a canonical tag to the main site. I want to set up GA to capture who is going to the subsites and vice versa and correctly capture crossover traffic. Any advice on implementing advanced analytics directly (or links to sources that will direct me the right direction for this project)
Reporting & Analytics | | theLotter0 -
Analytics oddity
This one has me a bit puzzled... I was just conducting a bit of routine analysis on a client's site, when I noticed avg. traffic doubled on one particular day. Now, this was easy to spot, since avg daily traffic for this site is 100 per day. The site also has approximately 100 pages of content. Here is the odd part... the spike was clearly attributed to Direct traffic and from a specific network in Palo Alto. The Bounce Rate was 100% and it appears that every page on the site was visited - very briefly. Any clues as to what may have triggered this? A competitor maybe? An unkown bot? I am looking forward to your thoughts.
Reporting & Analytics | | SCW0 -
Should you get a new Google Analytics account if your site has a new domain after a site redesign/new development?
We recently developed a new site for a client and they have opted to move forward with a domain change. Should we create a new Google Analytics account for the new site?
Reporting & Analytics | | TheOceanAgency0 -
Google Analytics session update question
Hello, With reference to seomoz blog post - http://www.seomoz.org/blog/panda-24-and-analytics-session-update-rolled-out-simultaneously#jtc151292 , i would like clarification about the following - User searches Google for "Product Name" and clicks on your AdWords advertisement. User leaves site and searches a few more times, click on competition and comparing prices and features. User ultimately decides to with your product, Googles "Your Brand + Product Name", clicks your organic listing, and buys the product. This whole process takes less than 30 minutes. "Your Brand + Product Name" will appear in your organic keyword report with 1 visit. My question is whether "Product Name" will also appear in organic keyword report with 1 visit if the visitor is not signed in. ( as search won't be encrypted ) Thanks
Reporting & Analytics | | seoug_20100