Google Analytics(分析):跟踪两个域名 [英] Google Analytics: Track two domains as one

查看:197
本文介绍了Google Analytics(分析):跟踪两个域名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在工作中,我们有两个服务于完全相同的网站/代码/等的域。我试图找出是否有方法通过Google Analytics跟踪他们,并拥有一个单一的帐户,可以不关心为分析数据提供哪个域?我目前遇到的问题是,我们用于广告的域名显示为隐藏(或者至少我不知道如何查找)真正源代码的引荐来源(google / bing / yahoo / etc )。

请注意...
在这里搜索后,我只是想补充一点,希望能够100%清楚。我不想单独跟踪这两个域名...我希望我的Google Analytics帐户合并数据,而不考虑用户浏览器显示的域名。 方案

您为什么要这么做?



如果有2个网域提供相同的内容,可能会被视为重复的内容,并可能导致您的谷歌排名。我建议将一个域名重定向到另一个域名,这样一个域名实际上可以处理网站,而另一个域名只会吸引访客。



如果您想要这样做

  var pageTracker = _gat._getTracker(UA-12345-1); 
pageTracker._setDomainName(none);
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();

但您还需要编辑所有链接,请阅读下面的文章。



http:// support.google.com/googleanalytics/bin/answer.py?hl=zh_CN&answer=55503


At work we have two domains that serve the exact same website/code/etc. I'm trying to find out if there is a way to track them through Google Analytics and have a single account that could not care less which domain it's serving analytics data for? The issue that I have currently is that the domain that we use for advertising is showing up as a referrer which is hiding (or at least I don't know how to find) what the true source was (google/bing/yahoo/etc).

Please note... After searching on here I just wanted to add this to hopefully make it 100% clear. I don't want to track the two domains individually...I want my GA account to merge the data without regard to what domain the users browser shows.

解决方案

Why would you want that anyways?

Having 2 domains serve the same content could be counted as duplicate content and could screw up your google ranking. I advice to redirect one domain to the other so 1 domain actually handles the website and the other just catches visitors.

If you would like to do it anyways

var pageTracker = _gat._getTracker("UA-12345-1");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();

But you also need to edit all your links, read the article below.

http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55503

这篇关于Google Analytics(分析):跟踪两个域名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆