2
我的頁面上只有Google Analytics代碼。它適用於除IE以外的所有瀏覽器,我甚至可以在此頁面上獲取其他腳本。然而,GA腳本不會觸發。我使用Fiddler來驗證它正在工作。Google Analytics(分析)腳本不會在IE中觸發。頁面上沒有其他元素損壞腳本
什麼是缺失?這令人沮喪。
IE9 64位
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-947358-1']);
_gaq.push(['_trackPageview']);
(function() {
var 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';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
</body>
</html>
您是否嘗試過使用IE中的開發人員工具來檢查ga.js是否正確加載? – ysrb
你是通過'http'還是'file'加載頁面? – steveax
我已經使用IE開發工具和Fiddler來嘗試驗證它是否正確加載。當頁面通過'http'和'file'加載時,腳本不會執行 –