3.6K members online now
3.6K 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

Tracking form submission

Follower ✭ ☆ ☆
# 1
Follower ✭ ☆ ☆



For the form page, i want to track the clicks on the submit button only when user moves to thank you page. I do not want to track the clicks on the submit button when user not moving to thank you page.




1 Expert replyverified_user

Re: Tracking form submission

Rising Star
# 2
Rising Star

Hi @MageshKumar m,


Depending on how your form submission is handled you can use a javascript snippet to detect if the form was successfully submitted.

For example, here is the code I use for the plugin Contact Form 7 in Wordpress 


document.addEventListener( 'wpcf7mailsent', function( event ) {
      ga('gtm1.send', {
      hitType: 'event',
      eventCategory: 'Forms',
      eventAction: 'Submit',
      eventLabel: gaLabel
}, false );

The event wpcf7mailsent fires when the form is successfully sent. You will need to find something similar for your form.


I recommend you using GTM, it helps a lot with event tracking.


Hope it helps,


Google Analytics Rising Star | Was my response helpful? If yes, please mark it as the 'Best Answer.' Learn how here!
Analytics Consultant at - Find me on Twitter | Email me

Tracking form submission

Follower ✭ ☆ ☆
# 3
Follower ✭ ☆ ☆

Hi Carlos,


Thanks for your solution.


I will check with my developer on this.