Analytics
3.8K members online now
3.8K 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

Tracking goals across subdomains

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

What is the process for linking goals between two sub-domains? We have what we would consider several micro-goals on our website (sub1.example.com). The macro-goal is to get the user to register via a third party website (which is on a separate domain which we have no control over). If the user were to register, a link would be emailed to them which they would click to finish their process (sub2.example.com/landing). I can create the micro-goals for sub1 within its own property, and I can create micro-goal for sub2 within its own property. I'm not sure how to see the overall funnel of sub1-->register-->sub2. Because we can't add a confirmation page to the middle step, knowing that the user made it to sub2 is the only way we know that they completed the transaction and the sub1 campaigns were effective. Both sub-domains belong to the same account (and the same parent domain, example.com) so unless I'm wrong, cross-site analytics shouldn't be needed. 

 

Can anyone point me in the right direction? 

 

Thank you!

-Austin 

1 Expert replyverified_user

Re: Tracking goals across subdomains

[ Edited ]
Top Contributor
# 2
Top Contributor

Hi Austin :-)
For subdomain tracking to occur.. the parent domain and both subdomains need to be using a single property with the cookie domain set to auto in the tracking code.


You then also need to create a new View and apply a filter to the View:
Once you have domain linking established, you will see only the request URI in the content reports, and not the top-level or sub-domain for a given page. So for example, for visits to the following pages:
http://www.example.com/index.php and another page on
http://sub.example.com/more.php
The reports will show:
— index.php
— more.php
You will not be able to distinguish which page is from which domain. To show the domain in the page reports, set a filter to include all components of the page URL, as follows:

In the View (Profile) Settings page, click the Add Filter link.
Choose Add New Filter and provide the filter a name.
Choose Custom Filter and select Advanced on the Filter type settings.
Under Advanced settings:
FieldA should be set to Hostname
FieldB should be set to Request URI
Set the values for both Field A and Field B to (.*), which is an expression that captures all characters.
Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice.
Your reports will now show:
www.example.com/index.php
— sub.example.com/more.php
This will capture the www.example.com portion of your URL and include that at the beginning of your page URL in the content reports section.

 

For cross domain tracking eg the two subdomains without the parent domain.. tracking code would require different setup but still requires a single property to be used.

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