Analytics
6.4K members online now
Discuss regaining access to Analytics accounts, restoring accounts, changing user access levels, and navigating the homepage
 
Guide Me
star_border
Reply

Do I Need To Create Separate GA Account For Subdomain?

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Do I Need To Create Separate GA Account For Subdomain? Please Help.

 

Example: I'm using a GA account to track website www.example.com, now I've set up a Blog in blog.example.com - My question is, do I need to create separate GA account to track my Blog or can I use the same GA tracking code to track that I'm using for my website?

1 Expert replyverified_user

Re: Do I Need To Create Separate GA Account For Subdomain?

Explorer ✭ ✭ ☆
# 2
Explorer ✭ ✭ ☆
Hello @Amav_L,

I'm not sure by separate GA account do you mean the entire account or a new property which has a different ID associated with it. but, you can use the same GA account but create a new property that targets blog.example.com only. Simply create the new property and use that as the main domain url. This new property will have entirely different setup associated with it including conversion goals and audience lists, etc.

Let me know if that helps!
Nick
Nick

Re: Do I Need To Create Separate GA Account For Subdomain?

Explorer ✭ ✭ ✭
# 3
Explorer ✭ ✭ ✭
Hi Arnav,

You can use same tracking code on all sites and create separate view for each account. Views can be filtered to view data from specific host name http://take.ms/gXHkE.

Hope this helps

Noman Karim

Re: Do I Need To Create Separate GA Account For Subdomain?

Rising Star
# 4
Rising Star
Arnav,

You can do everything at View level.

- Global view i.e. traffic for both example.com and blog.example.com
You will need a filter to append hostname to URI so that reports like All Pages will show the full URL. See link below on how to create the filter.
https://support.google.com/analytics/answer/1034342?hl=en#Next

- example.com view
Create an advanced filter of type include with Hostname as field and pass example\.com as value

- blog.example.com view
Create an advanced filter of type include with Hostname as field and pass blog\.example\.com as value

This way you will have 3 views, which I think is good practice. Some things to note:

- Tracking ID/tracking code is the same across main and subdomain
- I assume you're passing auto in the create method i.e. ga('create', 'UA-XXXXXXXX-X', 'auto'); as this will cover the subdomain
- I assume Referral Exclusion List has example.com as value https://support.google.com/analytics/answer/2795830

Noman - I thought I'd mention that your screenshot is an exclude filter as well as to escape regex special characters a backslash should be used, not a forward slash.

Cheers!

Re: Do I Need To Create Separate GA Account For Subdomain?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi Rodrigues,

Thanks for your reply.
Can you please help me a bit for about the 3 views.

I created a Copy of All website Data in View Level and Named it as "Extra View".
Now in "Extra View" I Created A Filter
Filter Type: Custom - Advanced (Selected from Radio Buttons)
Now 3 Fields are Showing
Field A -> Extract A
Field B -> Extract B
Output To -> Constructor
What to select and add on those 3 fields?

Do I Need To Create Separate GA Account For Subdomain?

Rising Star
# 6
Rising Star

Hi @Arnav L,

 

Apologies for not replying before but I've just received an alert from the forum - after one month...

 

To create a filter for the blog.example.com subdomain

 

Filter type - Custom > Include

Filter field - Hostname

Filter pattern - blog\.example\.com

 

Let me know if that helps.