本文介绍了在 Google Analytics 中跨子域跟踪目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有两个平台,一个营销网站和一个 SaaS 解决方案.

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

营销网站位于 www.domain.com 等主域上,而 SaaS 解决方案位于我们的子域 sub.domain.com 上.

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

我想跟踪通过我们的营销网站注册我们的 SaaS 解决方案的客户的转化率.

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

如果我进入营销网站的目标,我可以选择目标的相对路径,例如 www.domain.com/signup-completed,但实际注册是在 sub.domain.com/signup-completed 上.我如何在营销网站上跟踪这一点?

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.

推荐答案

首先,子域和域的属性必须相同,即相同的 UA id.

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

其次,要从子域跟踪目标,您需要在页面维度中包含 URL 的每个部分.通常您将无法区分哪个页面在哪个域中

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

对于上述情况,您需要创建一个过滤器来修改 URL 以包含域:

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

步骤:

  • 在查看(个人资料)设置"页面中,点击添加过滤器"链接.
  • 选择添加新过滤器并为过滤器提供名称.
  • 选择自定义过滤器,然后在过滤器类型设置中选择高级.

在高级设置下:

  • FieldA 应设置为主机名
  • FieldB 应设置为请求 URI
  • 将字段 A 和字段 B 的值都设置为 (.*),这是一个捕获所有字符的表达式.
  • 将输出设置为 --> 构造函数选项以请求 URI 并提供$A1$B1 作为该选项的值.
  • 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 anexpression that captures all characters.
  • Set the Output To --> Constructor option to Request URI and provide$A1$B1 as the value for that choice.

您的报告现在将显示:

  • www.domain.com/example.html
  • sub.domain.com/moreexample.html

这将捕获您网址的 www.domain.com 部分,并将其包含在内容报告部分中网页网址的开头.

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:我建议创建新视图,放置此过滤器,然后创建目标,以免影响其他视图中的数据

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

这篇关于在 Google Analytics 中跨子域跟踪目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 16:58