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
-
How to filter out traffic from subdomain using regex?
Hi There, We have a test server that lives on a subdomain which we'd like to filter out in Google Analytics. We're using the hostname filter but are having trouble understanding the regex needed, we're using this as the filter pattern: .domain.com. Will that work? The profile is new so we can't test the pattern. Any pointers in the right direction would be much appreciated. Cheers Ben
Reporting & Analytics | | cmscss0 -
Access to GA revoked
Hi, If the company gives me access to Google Analytics for two days, will I still be able to see the data after day three? I am interested in past data not the future or current.
Reporting & Analytics | | aliciaporrata10090 -
How do I setup a logged-in vs. non logged-in custom variable in Google Analytics?
I found an example of the snippet to use: __gaq.push(['.setCustomVar,
Reporting & Analytics | | Evan34
1, // first slot
'user-type', // custom variable name
'visitor', // custom variable value
2 // custom variable scope - session-level
]); Once the visitor logs into your website, we change this code, accordingly: __gaq.push(['.setCustomVar,
1, // first slot
'user-type', // custom variable name
'regular-user', // custom variable value
2 // custom variable scope - session-level
]); How does the code know to change from 'visitor' to 'regular user' once a user logs in? Is the snippet only placed on the login page?0 -
Cross Domain Tracking in GA (without cross domain links)
Hi everyone, Been doing some research about cross-domain tracking in Google Analytics (preferably Universal Analytics where documentation is a bit spare). All of the tutorials focus on the auto-linking and ensuring links to the other site are taken care of. I'm considering a site that may not cross-link like that at all (or it may, but won't be the main avenue). A good example is: www.gap.com
Reporting & Analytics | | ketanmv
www.bananarepublic.com
www.oldnavy.com Now, they do link to the other brands in their navigation but let's pretend that they don't necessarily do that. Gap Corporate may want to roll up all these domains into a single reporting profile because customers can clearly visit any of those sites on their own and buy. It would be nice to know that Visitor X bought 2 items from gap.com and 3 from oldnavy.com... and of course, here were their campaigns, etc. From what I am reading, I am not sure this is really possible. It seems that the cross-domain code is really only best for when my main site links to another domain for checkout or something. But in my example, we are definitely not in control of that kind of behavior. Thoughts? Perhaps I need to recommend they go with subdomains only which Universal GA seems to handle quite fine out of the box. Thank you!0 -
Reported data in Multi-channel funnels in GA wrong?
I'd love to start using the Multi-channel funnels feature in Google Analytics but I have zero confidence in the reported data as it seems to bear no relationship to the standard ecomm reports. To be specific, in August 2013, MCF is reporting the following for email campaigns: Assisted conversions = 20
Reporting & Analytics | | Bluesnapper
Assisted conversion value = £1,405.91
Last Click or Direct Conversions = 14
Last Click or Direct Conversion Value = £369.57 Now switching to the traffic sources report, GA reports for the email campaigns revenue was £1,226,41 over the same period across 21 transactions. My interpretation of this is that the email campaigns were the "last-click" and delivered £1,226,41 and 21 "conversions" (as I have no goals configured in this GA view, conversions = transactions I believe) That leaves the MCF last-click report short by £856.84 (£1,226,41 - £369.57) I can see no reason why this should be so unless I'm not interpreting the data correctly! Anybody have any suggestions/ideas as to what's going on? Any help appreciated.0 -
GA mediums
I know this may be an easy question, but I keep seeing mediums titled SEM and (not set) in my GA. I can't seem to find the Google definition. Does anyone know what this means?
Reporting & Analytics | | KJ-Rodgers0 -
How are 301s reported in GA?
Does anyone have any insight on exactly how on-site 301s are reported in Google Analytics? My direct traffic seems to climb at the same rate as my organic with absolutely no off-line promotion. I have a suspicion that the 301s that I have built to re-coupe traffic being sent to old pages are being reported as direct. Any validity to this?
Reporting & Analytics | | NextGenEDU0 -
GA custom reports involving pages and goals - what are the metrics saying?
Hi, All! I would like to create a custom report that will enable me to see which of my pages are contributing to goal completion on my site (so I can then optimize the pages that are contributing the most, with maximal ROI for the optimization investment). If I make the dimension "page/page title" and the metric "goal X completions" - which would make sense - what exactly are the numbers that I am seeing telling me? Is it how many times a person started the goal funnel from that pages (meaning every goal would appear only once and there be no overlap)? That doesn't appear to be the case with the numbers, because the headline in the main "Goals" section tells me I have 30 goal completions for that goal, for example, but the headline in the custom report (which is adding up all the numbers) is, say, 100. Or does it mean the number of times that this page was ever in the navigation path of someone who ended up completing a goal? Then the same goal would be counted multiple times, for each page in the path. Additionally, I see this strange thing on some of my reports where the actual funnel pages appear as contributing towards goals, which I guess makes sense, but again the numbers don't match up. If the goal was to get to page B, and the funnel was A->B, and there were supposedly 30 goal completions, my custom report says that A gave 28 goal completions and B gave 25. Anyone know for sure - or through testing - what the case is with all these things? Any explanations will be much appreciated!
Reporting & Analytics | | debi_zyx0