我将数据库中的数据生成了上千条的数据。
我在模板中引入了js统计代码。
但是后来发现js统计代码无效。使用js的调试工具(MS based js 调试工具)打开,弹出错误提示!如何才可以使这一段Google analysis统计代码外置生效?
希望知道的写一下。js代码的内容如下:
// JavaScript Document
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-8398083-2");
pageTracker._trackPageview();
} catch(err) {}