Event as a goal
I wish to use 'Event' as a Goal in GA. There is a 'contact us' form that we have on the website.Want to set the submission of the form as an event. I understand that there is an Event tracking code generator. Here, my question is what is the difference in the code that starts with on_sent_ok and the one that begins with onclick for Contact form.
on_sent_ok: "ga('send', 'event', 'Contact Form', 'submit');"
<input type="submit" onclick="ga('send', 'event', 'Contact Form', 'submit');">
So the second option would track all clicks on the submit button, not only successful form submissions. Let me know if you have more questions.
Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital