Onclick Event not recording in Google Analytics -


my google analytics events stopped working unknown reason. didn't make changes code , i'm pretty sure nobody else did well. checked through , looks should working. can spot issue this?

first header script:

    <script>   (function(i,s,o,g,r,a,m){i['googleanalyticsobject']=r;i[r]=i[r]||function(){   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new date();a=s.createelement(o),   m=s.getelementsbytagname(o)[0];a.async=1;a.src=g;m.parentnode.insertbefore(a,m)   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');    ga('create', 'ua-?????????-1', 'auto');   ga('send', 'pageview');      </script> 

next button triggers event:

<input name="button" type="button" class="button" onclick="return checkvalues(true); ga('send', 'event', { eventcategory: 'lead', eventaction: 'click', eventlabel: 'clickonform'}); " value="submit" width="20px" /> 

and of course analytics settings themselves.

(3) goal details

category - equals - lead

action - equals - click

label - equals - clickonform

value - greater - 0

use event value goal value conversion

maybe friday thing , overlooking obvious, mind can't wrap around this, appreciated!

you returning value of "checkvalue(true)" before event sent. try send event first, , return.

also, not passing in event value, goal configured convert if value greater 0. might need check on that.


Comments