Google Analytics缺少analytics.js脚本 [英] Google Analytics Missing analytics.js script

查看:160
本文介绍了Google Analytics缺少analytics.js脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被禁止复制Google分析跟踪代码问题。它看起来像谷歌标签助理不考虑我从该网站生成的GA跟踪JS复制的代码。



该网站在,显然这是一些云技术的一部分,需要在Wordpress中有一个特殊的插件。



I请参阅跟踪浏览器网络选项卡中的呼叫,因此看起来问题很可能是纯粹的外观(尽管chromes GA调试器扩展程序也无法接听呼叫)。


I'm stucked on copying google analytics tracking code issue. It looks like Google Tag Assistant doesn't consider the code I copied from the generated GA tracking JS for the site.

The site is in http://www.orchid.co.nz/

I added the codes on the header. This should work correctly like what I'm doing with the other sites I worked with. However, this one is weird. I can't figure what's wrong.

Anything I missed?

解决方案

Not sure if this will fix the issue, but you are telling the browsers to parse the script as "rocketscript":

<script type="text/rocketscript">
  (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');
....

I don't know what rocketscript is and I guess neither does the Tag Assistant. Try to change this to "javascript" or not to use a type attribute at all.

Here is a discussion about rocketscript, apparently this is part of some Cloud technology and requires a special plugin in Wordpress.

I see tracking calls in the network tab of the browser, so it looks like the problem might very well be purely cosmetic (altough chromes GA debugger extension does not pick up the calls, either).

这篇关于Google Analytics缺少analytics.js脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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