Track Goals across subdomains in Google Analytics

前端 未结 1 1465
日久生厌
日久生厌 2021-01-15 08:17

We have two platforms, a marketing site and a SaaS solution.

The marketingsite is on the main domain like www.domain.com and the SaaS solutions is on our subdomain

相关标签:
1条回答
  • 2021-01-15 08:44

    First of all, the property must be same for both subdomain and domain, i.e. same UA id.

    Secondly, to track goals from sub domain, you need to include every part of the URL in the Page dimension. Normally you will not be able to distinguish which page is on which domain

    For the above you need to create a filter that would modify the URL to include domain:

    Steps:

    • 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.domain.com/example.html
    • sub.domain.com/moreexample.html

    This will capture the www.domain.com portion of your URL and include that at the beginning of your page URL in the content reports section.

    You can then easily set the goals :)


    PS: I would recommend to create new view, place this filter and then create goals, so that the data in other views wont be affected

    0 讨论(0)
提交回复
热议问题