V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
CSGO
V2EX  ›  问与答

求问如何给 analytics.js 里添加 Google Analytics?

  •  
  •   CSGO · Dec 4, 2018 · 889 views
    This topic created in 2700 days ago, the information mentioned may be changed or developed.

    我 html,是已经全部 head 里写好了:

    <script src="/analytics.js"></script>

    然后我现在在服务器上的根目录的 analytics.js 里添加了百度网页统计:

    var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?c1c285d53*7"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

    可以正常工作;

    然后我又注册了 Google Analytics,里面提示这样: http://imgup.nl/images/2018/12/04/QQ20181204-115403.png

    那么我应该如何在 analytics.js 也加上 google 的跟踪代码?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2311 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:02 · PVG 08:02 · LAX 17:02 · JFK 20:02
    ♥ Do have faith in what you're doing.