gpt4 book ai didi

javascript - '_' 中的意外悬挂 '_gaq'

转载 作者:可可西里 更新时间:2023-11-01 02:17:16 25 4
gpt4 key购买 nike

<分区>

我正在尝试使用 JSLint 验证我的 Google Analytics(分析)代码,但我收到了很多错误消息:

代码:

/*global document */
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-24389816-1']);
_gaq.push(['_trackPageview']);

(function () {
var s,
ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
}());

错误信息:

Problem at line 2 character 5: Unexpected dangling '_' in '_gaq'.

var _gaq = _gaq || [];

Problem at line 2 character 12: Unexpected dangling '_' in '_gaq'.

var _gaq = _gaq || [];

Problem at line 3 character 1: Unexpected dangling '_' in '_gaq'.

_gaq.push(['_setAccount', 'UA-24389816-1']);

Problem at line 4 character 1: Unexpected dangling '_' in '_gaq'.

_gaq.push(['_trackPageview']);

怎么了?谢谢。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com