具有子域和聚合数据的 Google Analytics
我正在构建一个网站网络,该网站具有 example.com 的单个主域和使用主域的子域的多个区域站点,例如:
- example.com
- site1.example.com
- site2.example .com
我有两个目标使用此网络设置 Google Analytics,但恐怕根据 GA 的工作方式,这可能会相互矛盾:
我想为每个子域提供自己的 GA 帐户,以便区域站点的管理员可以看到他们的统计数据,但看不到其他区域
我希望能够将所有区域站点数据与国家站点数据进行聚合,以供执行管理人员审核。
虽然为每个网站设置自己的 Google Analytics 帐户非常容易,但我不知道这是否是正确的方法。
我可以使用 Google Analytics 满足目标 #1 和 #2 的要求吗?如果是,我怎样才能最好地执行它?
I am building a network of sites that have a single main domain at example.com and several regional sites that use subdomains of the main one, such as:
- example.com
- site1.example.com
- site2.example.com
I have two goals for setting up Google Analytics with this network, but I'm afraid it may be contradictory based on how GA works:
I want to give each subdomain its own GA account so that managers of the regional sites can see their stats, but not the other regional sites.
I want to be able to aggregate all of the regional site data with the national site data for executive management review.
While it's pretty easy to set each of these sites up with a Google Analytics account of their own, I don't know if this is the right way to go.
Can I satisfy the requirements of goals #1 and #2 with Google Analytics? If yes, how can I best execute it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种方法是让页面代码指向相同的配置文件(相同的
UA-XXXXXXX-X
),但基于相同的配置文件设置单独的配置文件。然后使用过滤器根据子域发送数据。这样您就不必为页面代码的多个版本而烦恼。但是,您需要在所有页面(在所有子域上)的页面代码中添加以下内容(在
trackPageview
调用之前),以确保跟踪所有子域:然后您将应用过滤器到每个配置文件:
(预定义过滤器)
对您为每个站点设置的每个配置文件执行此操作。
就#2而言,您只需将第一个配置文件(上面)作为“全局汇总”生成所有其他配置文件,而无需任何过滤器,因此它将获得所有流量。
您还可以在配置文件编辑器中指定谁有权访问哪些配置文件。
令人遗憾的是,您需要在每个个人资料中单独设置您的目标。
One way to do it would be to have your page code point to the same profile (same
UA-XXXXXXX-X
) but set up separate profiles based on that same profile. Then use filters to send data based on the subdomains.That way you don't need to mess with having multiple versions of your page code. But, you will need to add to your page code for all your pages (on all your subdomains) the following (before the
trackPageview
call), to make sure all subdomains are tracked:Then you would apply filter to each profile with:
(Predefined filter)
Do that for each profile you setup for each site.
As far as #2, you'd just have the first profile you spawned all those other profiles off of (above) as a "global rollup" without any filters, so it will get all the traffic.
And you can specify who has access to what profiles in the profile editor.
One bummer is that you will need to go in and setup your goal(s) individually in each profile.