4.9K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Goals on A Sub Domain

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

 

Hello GA Community,

 

I need some help. My objective here is to track conversions on a sub domain.

 

Domain = hueya.io

Sub - client.hueya.io

 

Signing up for an account occurs on the subdomain and the confirmation url is https://hueya.io/results/results_display/

 

Do I need to use a RegEx goal? If so, can you point me toward some documentation to help or help with the formula? Thanks!

 

 

1 Expert replyverified_user

Goals on A Sub Domain

Top Contributor
# 2
Top Contributor

Hi :-)

When subdomain tracking tracking code for the same property/tracking id gets placed on the main domain and subdomain.

You then need to create a new View and apply the following filter 

  • Filter Type: Custom filter > Advanced
  • Field A: Hostname Extract A: (.*)
  • Field B: Request URI Extract: (.*)
  • Output To: Request URI Constructor: $A1$B1

Click Save to create the filter.

 

It prepends the hostname to the request URIs so as to be able to tell which domain a pageview occurs on.. it will also allow you to setup destination goals and/or funnels that occur across the two.

 

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Goals on A Sub Domain

Explorer ✭ ✭ ✭
# 3
Explorer ✭ ✭ ✭

I think GA automatically tracks subdomains if tracking code is placed in main domain.Then after this you can set up normal equals to type destination url goal in this case.@Bronwyn V am i right?

 

Re: Goals on A Sub Domain

Top Contributor
# 4
Top Contributor

@Soumik Ghosh


Soumik Ghosh wrote:

I think GA automatically tracks subdomains if tracking code is placed in main domain.Then after this you can set up normal equals to type destination url goal in this case.@Bronwyn V am i right?

 


 GA does not automatically track subdomains if code is placed in main domain.


If pages on the subdomain need to be tracked, then tracking code needs to be installed to the subdomain pages as well.
cookieDomain needs to be set to auto in the tracking code (which it is set to by default), for correct sharing of session and clientID etc to occur

Then follow the rest of the instructions in my previous post re the view and filter creation etc.
Without it, pages with the same Request URI's will not be separated in the reports, and reported 

in aggregate.

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Re: Goals on A Sub Domain

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

@Bronwyn V Thank you for your response.

 

It looks like this should help me track the subdomain traffic in another view. Correct? For some reasons I still do not see traffic displaying in the real time report in this view.

 

Did I config the view properly?

 

Next step for me will be to config a URL goal. Correct?Screen Shot 2017-03-23 at 10.53.43 AM.png

Re: Goals on A Sub Domain

[ Edited ]
Top Contributor
# 6
Top Contributor

Hi @Scott R

Subdomain traffic will track in all views.. but where say the homepage is represented in reports (for example) as / or index.html, 

it will report the data for those pages in aggregate totals rather than indicating which domain the pageview happened on. This can make it difficult when trying to report on performance of particular pages or configure goals or funnels across a variety of domains/subdomains.

 

Slight edit to the above filter is required
Field A and Field B filter patterns should be entered just as (.*)

Field B is also not required, not all pages will have a Request URI to append

 

extract1.jpg

 

 

Regex goal should not be required.. if you are simply setting up a destination goal 

without any funnels or without needing to track urls that include variables etc.. then you could use

an Equals to match type and simply enter https://hueya.io/results/results_display/
as the Destination 

 

eta - make sure to check that the referral exclusion has the domain listed as domain.com .. not www.domain.com as www is already a  subdomain not an ancestor of the other subdomains also being tracked by the setup 

 

 

 

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Goals on A Sub Domain

Explorer ✭ ✭ ✭
# 7
Explorer ✭ ✭ ✭

Hello @Bronwyn V

Sorry for not understanding it.

I have two questions.

 

# case 1 :

If I use normal google analytics code (without tag manager) what will be the steps?

 

Here is the steps I think is correct.Please correct me if i am wrong.

First I need to put the tracking code in my root domain,then have to put that same exact tracking code in all the subdomains i needed to track.

After that I have to implement the filters you mentioned.

Thats it

 

# case 2 :If I use  google analytics code (with tag manager) what will be the steps?

First i have to create a tag manager account,then have to put the same exact container code in the root domains and all other subdomains.

Then in the tag manager account I have to specify the cookie domain to auto and create only one Google analytics pageview tag which will fire on all pages.

Then i have use the filter you mentioned to show subdomains in the report.

 

Thats it.

 

Please answer 

Goals on A Sub Domain

Top Contributor
# 8
Top Contributor

@Soumik Ghosh

 

# case 1
the filter is not mandatory.. if i was simply wanting to see all activity and say pageview activity for domain and subdomains in aggregate then i wouldn't bother with the filter.
If trying to create goals though or funnels. then yes, filter will usually be needed.

 

#case 2

I don't know if using the same container code is a necessity, however I do believe it is recommended. I would imagine it would be difficult and unnecessary extra work to maintain the same tag setup in two different containers though
For GTM related questions and issues, the GTM Help Forum is available

https://productforums.google.com/forum/#!forum/tag-manager

 

and again.. filter is not mandatory.. depends on tracking needs

 

do make sure though to check that the referral exclusion has the domain listed as domain.com .. not www.domain.com as www is already a  subdomain not an ancestor of the other subdomains also being tracked by the setup 

 

 

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here

Goals on A Sub Domain

Visitor ✭ ✭ ✭
# 9
Visitor ✭ ✭ ✭

It auto selects that Field A required but not Field B.

And Override Output Field is checked. Is this setting ok? Or do I need to also require Field B?

Goals on A Sub Domain

Top Contributor
# 10
Top Contributor

@Ayelet P :-)

 

 

The check box for Field B required does not need to be checked.

 

Thanks

Bronwyn

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here