GA Subdomain Setup
-
Hi Mozzers,
Can someone show me how to add a subdomain profile (sub.example.com) under the master profile (www.example.com) on Google Analytics.
I am not sure on how to set it up.
Thanks
-
Yep, it should be /$A1$B1. Sorry about that!
-
Thanks ... DId you mean to say /$A$B1for Output To -> Constructor
In your comment yesterday you omitted the 1 after the B so I just wanna be sure I got this correct. I put /$A$B1 in my filter.
I very much appreciate the help.
-
Yep. I think that you need to select "Request URI" and then enter /$A$B (which is the same as above, but with a slash before it).
By the way, all of this info came from a great post I found: http://www.bigdaylight.com/analytics/filtering-subdomains-in-google-analytics/. You can also look there and check in the comments for other updates.
-
Thanks so much for the info. Getting everything set up and just want to check with you regarding the dropdowns in filter setup.
In your instructions you wrote -->
6. Field B -> Extract B:
Select “Request URL” from the drop down.
Enter (.*) in the text box.
7. Output to Constructor:
Select “Request URL” from the drop down.Enter $A1$B1 in the text box.
but there isn't a Request URL in the dropdown choices. Only Request URI which I assume is the correct choice since we're talking about filtering URI's and not URL for main domain and subdomain.
Can you verify that choosing 'Request URI' is what you meant to write or let me know if there is a different selection that I should make?
I've attached a screen cap of my dropdown options.
Thanks in advance -- you've been a great help.
-
The picture that you showed tells Google to track the subdomain support.yoursite.com along with www.yoursite.com. However, if you have these two pages:
support.yoursite.com/your-product/
www.yoursite.com/your-product/
They will both be recorded as /your-product/ in the Google Analytics data. The (unfortunately very complicated) filter that I listed earlier is to add /subdomain/ in the folder structure, so that:
support.yoursite.com/your-product/ will be tracked as /support/your-product/
www.yoursite.com/your-product/ will be tracked as /your-product/
Is that a little clearer?
-
-
Hi Kristina,
I created that profile combining the main domain and subdomain but what I don't understand is that never when creating the filter I am inserting the name of this subdomain.
So are you saying that the name of the subdomain is not necessary and GA will still track the subdomain in question?
Thanks
-
The way I recommended originally is to have one profile that has both your main domain and your subdomain mixed together, and the filter that I described would append the subdomain as a /folder/ in the URLs that Google is tracking. The filter should automatically populate that /folder/.
Best,
Kristina
-
Hi Kristina,
Sorry to bother you again but I still have an interrogation regarding the Reg ex you gave me. My concern is that no Reg expression is emphasizing on the subdomain i am trying to track.
I think in order to do that I would have to go under the "profile settings" and insert sub.example.com as the website's URL, right?
thanks
-
Nope, sorry, I wasn't very specific about when you add +New Property. When you're at the highest level, click on the account that you want to add the main domain and subdomain tracking to, and the next level down should have a button that says +New Property.
I believe that you'll have to have two codes on your site, since they're slightly different. If anyone knows a way to just have one code but track on multiple properties, chime in!
-
Thank you for this in depth answer
Did you mean by +new property= +new account
If it is so, my question is: is it ok to have 2 GATC codes on all the pages since you are saying we should a get a new property?
Thanks
Ty
-
Hi Ty,
Google recommends that you keep your original profile for the main site running and create a separate profile for the combined main domain and subdomain tracking, so to get things going, you should:
- Go under "Admin," like you had seen before
- Click +New Property
- Fill out the setup information (name it something that'll remind you that you're combining the main domain and subdomain here
- Then choose select "one domain with multiple subdomains" for the tracking code.
The, yes, you're going to put that code on both the subdomain and the main domain pages.
The filter is to distinguish between the main domain and subdomains while you're in Google Analytics. GA only reports everything after the domain, so if you have two pages, www.main-site.com/page1/ and subdomain.main-site.com/page1/, they're going to be reported as /page1/, and their data will be combined.
http://www.bigdaylight.com/analytics/filtering-subdomains-in-google-analytics/ tells you how to set up a filter to distinguish between the two:
1. Select “Add new Filter for Profile”
2. Filter Name: “Show Full URLs” (or your own description)
3. Filter Type: Custom Filter
4. Select “Advanced”
5. Field A -> Extract A:
Select “Hostname” from the drop down.
Enter (.*) in the text box.
6. Field B -> Extract B:
Select “Request URL” from the drop down.
Enter (.*) in the text box.
7. Output to Constructor:
Select “Request URL” from the drop down.
Enter $A1$B1 in the text box.
8. Field A Required: Yes
Field B Required: No
Override Output Field: Yes
Case Sensitive: NoAfter that, you should be set.
-
Hi Kristina
thanks for the doc. From my understanding:
Step 1: I would go under "admin", then "tracking code", select "one domain with multiple subdomains", then save
Step 2: Copy and paste the new GATC on sub domain to sub.example.com. Should I capy and paste this new GATC under the main domain too?
Step 3: go to "Profile", then click "+new profile" , create a profile
Step4: add a filter but then I am not sure what to do? There is an advanced setting i have to go to as well?
Anything eles i should do too?
Thanks
Ty
-
Hi Taysir,
It's not a simple process, and you're going to have to modify your GA code on your subdomain pages for it to work. Google has the instructions here: https://support.google.com/analytics/bin/answer.py?hl=en&answer=55524.
Let us know if you have problems with any of Google's steps,
Kristina
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
-
If website users don't accept GDPR cookie consent, does that prevent GA-GTM from tracking pageviews and any traffic from that user that would cause significant traffic decreases?
I've been doing a lot research on GDPR impact and implementation with GTM-GA for clients, but it's been 12 months since GDPR has gone live I haven't found anything on how GA traffic has been impacted if users don't accept cookie consent. However, I'm personally seeing GA accounts taking huge losses in traffic since implementing GDPR cookie solutions (because GTM/GA tags aren't firing until cookies are accepted). Is it common for websites to see significant decreases in traffic due to too many users not accepting cookie consent? Are there alternative solutions to avoid traffic loss like that and still maintain GDPR compliance? It seems to me that the industry underestimated how many people won't accept cookie consent. Most of the documentation and articles around GDPR's start (May 2018) didn't foresee or cover that aspect properly, everything seems to be technically focused with the assumption that if implemented properly most people would accept cookie consent, but I'm personally not seeing that trend and it's destroying GA data (lost traffic, minimal source attribution, inaccurate behavior data, etc). Thanks.
Reporting & Analytics | | Kickboard2 -
Subdomain vs Domain
I have a single product website running in a one page layout
Reporting & Analytics | | Roman-Delcarmen
my web have some internal pages such as, terms and conditions, policies and so on.
But in order to get a better ranking I decided to create a blog in the website, but my IT team told me that we can do it but in a subdomain.
The main domain use cakephp with a configuration oriented to security ( we had bad experiences with normal cms or ecommerces) So the structure of the website will this one www.mystore.com for the ecommerce blog.mystore.com for the blog So my questions are:
How is going to affect my seo?
Is there any difference betwen mystore/blog.com vs blog.mystore.com?
Wich is the best option for Google Analitycs / Search Console a single property or 2 properties? If you know some post or tutorial related with my question will be appreciated Thanks Guys1 -
Does subdomain (or sub sub domain) affect analytics data of root site?
We self-host our public website, but over time have also added subdomains onto it that are not public and are for internal or even client portals. I am seeking advice as to whether those subdomains affect the analytics data (self referrals, visits, bounces) of the public site that I am tasked with analyzing. I feel that it does skew the data but need to build a solid case to move the public website to a new domain, so as to leave the existing one in tact with all of its subs.
Reporting & Analytics | | MarketingGroup0 -
Goals tracking across subdomains
Hi all, I'm having some trouble with regards to setting up goals tracking in Analytics across subdomains and was hoping that someone could help me out. Okay I work for an insurance company and we use a Quote & Buy portal for our insurance policies. Our website - www.example.com sends the traffic to quotes.example.com. Both of these sites have the same Google Analytics tracking ID. The quotes.example.com has no duplicate URLs which appear one our website, therefore I only set up the account to only include the hostname for each. Does this sound correct? The goals issue is if I now set up a goal in the quotes.example.com account, someone comes to www.example.com via Google and then clicks through to our journey and completes, will this count as a referral from www.example.com or as a goal from Organic? I'm totally stuck so any help would be appreciated. Thanks Ben
Reporting & Analytics | | Markerstudy0 -
How to better track subdomains in Google Analytics?
Hello Everybody! so I am setting up a website that will have several subdomains, based on the language of the site, for example: site.com; es.site.com; fr.site.com... How should I trace this is GA but having attention that I should be able to see visits as a whole and also if I want I should be able to see visits per subdomain, anything on specific I should do when creating the account? And after creating the account, how to separate that accordingly? 🙂 Thank you all!
Reporting & Analytics | | NelsonF0 -
Does a Manual Penalty Affect Other Sites in Same GA Account
Hello Mozzers, I was a bit foolish a couple of years back when first getting into the game, and employed a dodgy agency to do some SEO for me on some sites. Fast forward to this year, and the two sites in my Google Analytics account have been hit with a manual penalty. I decided to ditch the websites and move on, so removed them from my GA account, webmaster tools etc and will simply let them die a death. My question is, do you think this would affect how easy it would be to rank other websites within my GA account? Does anybody have any views on this? Thanks!
Reporting & Analytics | | Marc-FIMA0 -
How to see traffic for specific keywords in GA
Hell guys, What i want to achieve is to generate a list of specific keywords showing traffic for a certain periode of time. I also want so be able to compare this time period with historical data. I want a list as shown in: Traffic sources -> sources -> search -> organic. This shows a list of keywords generating traffic out of the organic search results. When you use a filter you can only use one word so it seems. I just want to create that list but with the specific keywords i choose to display. I tried advanced reports and advanced segments but that doesn't really give me what i want. The idea behind this whole thing is that i want to give my client an overview of the traffic received on the words we are optimizing for. this traffic has to be compared to the previous month so they can see clearly if there were changes. Thx !
Reporting & Analytics | | 5MMedia0 -
Tracking Multiple Top Level Domains in GA
Hi, I am setting up Google Analytics for www.example.co.uk and www.example.ie Is this as simple as just adding GA tracking code 'track Multiple top-level domains'? With this method how can I distinguish between each site's incoming traffic? Do filters needed to be created? Thanks in advance 🙂
Reporting & Analytics | | daracreative0