简体   繁体   English

同一页面上的多个Google Analytics(分析)

[英]Multiple Google analytics on same page

How do you setup the current analytics.js to send results to multiple Google accounts? 您如何设置当前的analytics.js以将结果发送到多个Google帐户? These are different UserIDs. 这些是不同的用户ID。

<script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-XXXXXX-46', 'auto');
    ga('send', 'pageview');

    ga('create', 'UA-YYYYYY-16', 'auto');
    ga('send', 'pageview');  

</script>

For some reason when I install Chromes Google Tag Assistant I get "No HTTP response detected" however their advice isn't particularly helpful on what that means. 出于某些原因,当我安装Chromes Google Tag Assistant时,会收到“未检测到HTTP响应”的信息,但是他们的建议对于这意味着什么并不是特别有用。 I have seen Google Analytics "No HTTP response detected" while tracking multiple accounts and using linker and the link but this doesn't apply to a basic example like mine. 在跟踪多个帐户并使用链接器和链接时看到Google Analytics(分析)“未检测到HTTP响应”,但这不适用于像我这样的基本示例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM