I use this snippet to track some clic on a link without loading a new page but analytics didn't record the clic, do I made a mistake?
<a onClick="document.getElementById('divCode').style.display = 'none';document.getElementById('lecode').style.display = 'block'; clic_code_bon();_gaq.push(['_trackEvent', 'Clic', 'Telephone']);">
<span class="">Obtenir le numéro</span>
</a>
开发者_运维百科Thanks for your inputs!
The function "clic_code_bon()" is apparently not defined on the page (and looking at the source, I don't see it). That's causing an error (in Firefox at least). The error happens before the call to the Google API, so that call does not happen.
You have to click on the link in order to see the error (obviously).
精彩评论