一个包含多个Google Analytics帐户的主站点

时间:2012-10-30 16:50:58

标签: google-analytics

我有10个网站共享1个主要网站来托管新的更新。目前,10个网站中的每个网站都有自己的谷歌分析,因为主要网站已经推出。他们的流量大幅下降。我可以在一个主站点上托管10个Google分析ID吗?

1 个答案:

答案 0 :(得分:1)

查看针对类固醇“多个帐户”的Google Analytics:https://github.com/CardinalPath/gas#multi-account-tracking

此外,Google还提供了有关_gaq

的精彩文档

https://developers.google.com/analytics/resources/concepts/gaConceptsAccounts

https://developers.google.com/analytics/devguides/collection/gajs/?hl=pl#MultipleCommands

http://scottpatten.ca/2011/11/multiple-google-analytics-codes-on-one-page.html

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1234567-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['account2._setAccount', 'UA-1234568-1']);
_gaq.push(['account2._trackPageview']);
_gaq.push(['account3._setAccount', 'UA-1234569-1']);
_gaq.push(['account3._trackPageview']);
_gaq.push(['account4._setAccount', 'UA-1234570-1']);
_gaq.push(['account4._trackPageview']);