附加域分析
我有一个可以从两个不同的 URL 访问的网站。 使用相同的文件和相同的数据库,但服务器端语言读取域名,如果是其中一种,则通过更改语言变量来提供不同的语言。
那么,在这种情况下,Google Analytics 应该如何实施呢?我应该为每个域使用不同的代码,还是为两个域使用不同的代码?
谢谢。
I have a website that can be accessed from two different URLs.
The same files and the same database are used, with the exception that the server-side language reads the domain name and if it's one or the other it serves a different language by changing the language variable.
Now, how should Google Analytics be implemented in this case? Should I have a different code for each domain, or one for both?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的两个网站是否会始终查看相同的数据库等?或者这两个网站的内容将来是否有可能会有所不同?
如果您当前的设置将持续存在,我建议在两个域上使用相同的跟踪代码。首先需要做一些额外的配置。
创建以下过滤器(按照下面的参考链接):
然后创建以下 4 个配置文件:
此设置将允许您以多种不同的方式对相同的数据进行切片,具体取决于您需要报告的内容。我们之前已经实现过类似的解决方案,并且发现它非常强大。
过滤器参考:
Will your two websites always be looking at the same database, etc? Or is there any chance that the content of the two sites will differ from each other in the future?
If your current setup is going to persist, I suggest using the same tracking code on both domains. There is some additional configuration to do first.
Create the following filters (as per reference links below):
Then create the following 4 profiles:
This setup will allow you to slice the same data in a number of different ways, depending on what you need to report on. We have implemented a similar solution before and find it quite powerful.
Filter reference: