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
-
Do I need a separate Google Analytics ID for a subdomain on my website?
Hello Everyone, I would like to know if I need a separate Google Analytics ID for a subdomain on my website? I have a sub-domain within my website, and the software for the site on the subdomain is asking for a Google Analytics ID. Should I be using the same Google Analytics ID as the main domain or should I be creating a new Google Analytics profile or ID? Thanks. Ryan
Reporting & Analytics | | RyanUK0 -
Is GA Real-Time Locations Broken?
When I look at my real-time site traffic in GA, I'm seeing a lot of direct traffic from Montvale, NJ. However, when I go to the audience tab for today or any day in the past, Montvale doesn't even show up in the list of cities sending traffic. What am I missing here?
Reporting & Analytics | | jimbeaux_slice2 -
Differences in site search revenue in GA
I just put in a piece of software to replace a really bad built in site search engine on my 3dcart website. Now I am trying to measure the change, but I am having some issues. When I check the ecom data in the conversions section of GA with the built in segment Performed Site Search, I get promising results. Approximately 5% revenue increase over LY. But if we jump to behavior, site search, usage, and then check the visits with site search, I get a decrease by 4%. And the actual revenue is off, by like double (150k compared to 80k) Anyone have any idea why I am getting these results? The site search function is set up. Tracking is enabled, query parameter is keyword and search url is /search.asp?keyword=
Reporting & Analytics | | ShockoeCommerce0 -
Has GA changed how it calculates bounce rate?
Updated website from Magento backend to Wordpress and since the redeploy, my bounce rate has dropped from 40% to 4%. I did check to see if there was duplicate GA tracking code but only one call. I checked reports under "visitor flow" and one page visits seem inline with the previous bounce rate. Weird. Never experienced this before.
Reporting & Analytics | | Timmmmy0 -
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 -
Subdomain tracking codes on subdomain and not root
Afternoon all. I’m pretty sure this is going to be fine but I thought I would seek some confirmation before I action anything. We have a blog subdomain on our site, I have just noticed that the entire blog (built in Wordpress) has no analytics tracking code on it. As this is built in Wordpress I have just logged in on an admin account I think people forgot I had and added the code to the header section as it is a two second job. My question is this – On the main account, subdomain tracking has not been turned on, so the root domain has not got the additional _gaq.push(['_setDomainName', 'rootdomain.co.uk']); line of code in it. I have included this on the blog.rootdomain.co.uk code as is necessary to enable tracking. Will this work or cause tracking issues? I think it should be ok. I don’t want to have to update the root domain code if I can avoid it as that will need to go through the development team and may take weeks as they are swamped and under resourced. Thanks, Rich.
Reporting & Analytics | | Sarbs0 -
GA: How can non related kws show up in the organic report?
Hi mozzers, I have a site A: www.example.com (with its own branded kws) SiteB: subdomain.example.com Site A and B are related and belong to the same company. Site B was released a couple months ago. ISSUE: I have noticed branded kws from Site A showing up on Site B's GA which doesn't make any sense. I try to make searches in the SE with those kws and not a single search showed the Site B(subdomain). What is weird is that 2 months ago had a an issue with bounce rate on site B showing a 0% bounce rate, then I discovered that we had 2 GATC on site, removed the extra code and bounce was back to normal. Since then I have seen a rise of branded kws from Site A to Site B. Can someone help me here figuring out what is wrong? Thanks
Reporting & Analytics | | Ideas-Money-Art0 -
Want to link to GA profile, but the one I want is not showing in drop-down
How can I manually add the correct Google Analytics data in to my account? The two options I see on the drop-down are not the ones I want to select and I don't see a way to do it manually. Help!
Reporting & Analytics | | Uniqueson0