Track Goals across subdomains in Google Analytics

独自空忆成欢 提交于 2020-01-11 11:28:47

问题


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 sub.domain.com.

I would like to track the conversion rate of the customers signing up on our SaaS solution through our marketingsite.

If I go into goals for the marketingsite I can choose a relative path to the goal like www.domain.com/signup-completed, but the actual signup is on sub.domain.com/signup-completed. How can I track this on the marketing site?

The two sites are setup as different properties under the same account.


回答1:


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



来源:https://stackoverflow.com/questions/44185657/track-goals-across-subdomains-in-google-analytics

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!