3.9K members online now
3.9K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
Guide Me

Form Submit Button Event Tracking

Follower ✭ ✭ ☆
# 1
Follower ✭ ✭ ☆

Hi All,


Trying to track an event around a form submit button on this URL (see the last slide and click red button)


I have event tracking code on this button but it's not triggering. Is it something to do with not including this element?

function handleOutboundLinkClicks(event)
This is the form code;
"<form id="contact-form" class="wide center" action="contact.php" method="post">
<input id="name55" class="stroke ae-5 wide done" name="name" placeholder="Your Name" required="" type="name">
<input id="email55" class="stroke ae-7 wide done" name="email" placeholder="Your Email" required="" type="email">
<input id="email55" class="stroke ae-8 wide done" name="telephone" placeholder="Your Telephone" required="" type="name">
<select class="ae-9 done" name="nearest">
<input id="email55" class="stroke ae-8 wide antsp done" name="url" placeholder="url" type="name">
<input class="button wide uppercase ae-10 button-55 done" name="submit" value="Send" onclick="ga(‘send’, ‘event’, ‘new micra launch‘, ‘click’, ‘submit interest button’);" data-success-text="Done!" type="submit">


Your help is much appreciated.

Thank you

1 Expert replyverified_user

Form Submit Button Event Tracking

Top Contributor
# 2
Top Contributor

Hi :-)
There is a syntax error in the code in the onClick for the event tracking


The single quotes around the the following need to be edited: 

‘send’, ‘event’, ‘new micra launch‘, ‘click’, ‘submit interest button’


atm they are single quote characters from like a word processed doc.. not plain text characters (like from notepad for example)

Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here