_gaq.push won't send data <p>somehow my <code>_gaq.push</code> function is not working. If I set <code>debug = true</code> I can see the logs, and I know it gets to the else (when I have <code>debug=false</code>) because I tried adding a log in it. Here's my code</p> <pre><code>var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXX-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); })(); var debug = false; function send_data(text, url) { if (debug) { console.log("_gaq.push(['_trackEvent', 'Site-change', " + text + ", " + url + "]);"); } else { _gaq.push(['_trackEvent', 'Site-change', text, url]); } } $('.navigation .child a').unbind('click').on('click', function(e) { var url = $(this).attr('href'); var text = $(this).text(); send_data(text, url); }); </code></pre> <p>Any idea?</p>