conversion tracking on click events
-
I need to track click events on my web forms.
I setup a hidden tracking button in the html after my form which gets triggered when the form is submitted successfully.
<div class="contact-tracking"><a href="#" onclick="_gaq.push(['_trackEvent', 'Webform', 'Submit', 'Homepage']);"></a></div>
I then simulate a click on it w/ js in the forms success action, which works.
$(“.contact-tracking a”).click();
The following error results:
Uncaught ReferenceError: _gaq is not defined
Reading a bit on this error apprently you have to define this _gaq array in the script. How do I do this with NK? I can see I can provide a custom script but not sure the point of using NK vs just adding the script directly to my html in this case.
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-65432-1']); _gaq.push(['_trackPageview']);
- The topic ‘conversion tracking on click events’ is closed to new replies.