这是我的 GA 代码:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_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>
此代码向 GA 事件跟踪报告:
<li><a href="#" onClick="_gaq.push(['_trackEvent', 'SiteQA2', 'click', 'Analytics click']);" class="button button-style4 button-big">Get Started</a></li>
但是这段代码没有:
<li><a href="./page2.php?id=5" onClick="_gaq.push(['_trackEvent', 'SiteQA2', 'click', 'Analytics click']);" class="button button-style4 button-big">Get Started</a></li>
知道我做错了什么吗?