javascript Google 转换不起作用 - 脚本无法加载
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10417042/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Google Conversions Not Working - Script Won't Load
提问by Tim Scott
I have an AdWords campaign for which I have set up conversion tracking. Google generated some code which I placed after the the begin body tag:
我有一个 AdWords 广告系列,我已经为其设置了转化跟踪。Google 生成了一些代码,我将其放在 begin body 标签之后:
<!-- Google Code for Sign Up Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 999999999;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "redacted";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js"></script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/999999999/?label=redacted&guid=ON&script=0"/>
</div>
</noscript>
It seems to work in Safari and IE. But it in Firefox and Chrome, loading conversion.js
fails. In Firefox the status says aborted
, in Chrome failed
. No status code.
它似乎适用于 Safari 和 IE。但是在 Firefox 和 Chrome 中,加载conversion.js
失败。在 Firefox 中,状态显示aborted
,在 Chrome 中failed
。没有状态码。
I've tried putting this code in various places including head and at the bottom.
我试过把这段代码放在不同的地方,包括头部和底部。
Ideas?
想法?
回答by Rob Grzyb
Do you have Adblock Plus or similar ad-blocking software installed? Adblock Plus will block the download of conversion.js, so you will need to disable ad-blocking on your site for testing.
您是否安装了 Adblock Plus 或类似的广告拦截软件?Adblock Plus 将阻止 convert.js 的下载,因此您需要在您的网站上禁用广告阻止以进行测试。