【发布时间】:2014-10-24 02:58:57
【问题描述】:
无论我做什么,点击跟踪 Google Analytics 代码都会收到“Uncaught TypeError: undefined is not a function”错误。
页面为:http://www.purevisionmethod.com/eye-exercises/
请问,为什么会这样……?
<script>
$('#clicked-headerbar').on('click', function() {
ga('send', 'event', 'website-banner', 'clicked-ad', 'headerbar', '0');
});
$('#clicked-cta-bottom').click( function() {
ga('send', 'event', 'website-banner', 'clicked-ad', 'cta-bottom', '0');
});
$('#clicked-sidebar-image-ad-1').click( function() {
ga('send', 'event', 'website-banner', 'clicked-ad', 'sidebar-ad-1', '0');
});
$('#clicked-sidebar-image-ad-2').click( function() {
ga('send', 'event', 'website-banner', 'clicked-ad', 'sidebar-ad-2', '0');
});
$('#clicked-sidebar-image-ad-3').click( function() {
ga('send', 'event', 'website-banner', 'clicked-ad', 'sidebar-ad-3', '0');
});
</script>
感谢您的帮助!!
【问题讨论】:
标签: javascript google-analytics