【问题标题】:Track multiple domains under the same google analytics account跟踪同一谷歌分析帐户下的多个域
【发布时间】:2012-10-01 02:24:36
【问题描述】:

我有两个域 mysite.com 和 mysite.cz,我想查看这两个域的流量来源,我目前不能,因为我只跟踪“.com”域。有什么想法可以实现吗?

【问题讨论】:

  • 这些不是子域,它们是单独的域。如果顶级域(.com/.cz)不同,它们共享相同名称的事实无关紧要,因此您应该编辑问题。
  • GA 为顶级域(.com、.cc、.co)提供了跨域自动链接插件,请看下面的答案

标签: google-analytics multiple-domains


【解决方案1】:

您需要在两个站点之间实现跨域跟踪,这并非易事。这里有很好的建议:

Google Analytics Cross Domain Tracking and _setDomainName()

【讨论】:

    【解决方案2】:

    除了 s6mike 你还可以实现跨域自动链接插件:

    为了简化跨域链接过程,假设您有一个托管在 source.com 上的网站,您想使用跨域跟踪进行跟踪:

    • destination.com
    • test.destination.com/page2
    • test.dest3.com?page4

    代码

    //Load the plugin.
    ga('require', 'linker');
    

    定义域

    // Define which domains to autoLink.
    ga('linker:autoLink', ['destination.com', 'dest3.com']);
    

    或用正则表达式定义

    // Define which domains to autoLink using a regular expression.
    ga('linker:autoLink', [/^example\.(com|net)$/]);
    

    allowLinker配置参数设置为true

    ga('create', 'UA-XXXXXX-X', 'auto', {
      'allowLinker': true
    });
    

    资源

    https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain#autolink

    编辑

    一旦您建立了域链接,您将只能在内容报告中看到请求 URI,而不是给定页面的顶级域或子域。

    1. 为您的主域设置一个没有过滤器的主视图(配置文件)。

    2. 创建一个视图(配置文件),专门用于跨域跟踪和重复使用主跟踪代码

      • 查看(配置文件)设置页面 -> 添加过滤器链接

      • 添加新过滤器

      • 自定义过滤器 -> 过滤器类型设置:高级

      • FieldA 到主机名和 FieldB 到请求 URI

      • 将字段 A 和字段 B 的值设置为 (.*)

      • 将输出设置为 --> 构造函数选项以请求 URI:$A1$B1

    您的报告现在将显示:

    example.com/index.php
    example.net/more.php
    example.cz/more.php
    

    资源

    https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite?csw=1#keyComponents

    【讨论】:

      猜你喜欢
      • 2013-11-08
      • 1970-01-01
      • 2018-11-02
      • 1970-01-01
      • 2012-06-14
      • 1970-01-01
      • 2019-04-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多