Title: HTML Forms Event Tracking
Last modified: January 5, 2022

---

# HTML Forms Event Tracking

 *  Resolved [DickRaney](https://wordpress.org/support/users/dickraney/)
 * (@dickraney)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/html-forms-event-tracking/)
 * I’m using the HTML Forms plugin and want to track form submit events. They provide
   a javascript snippet to detect a successful submit and I want to know how to 
   customize it to work with Monster Insights?
 * Their snippet looks like this:
 *     ```
       <script>
       html_forms.on('success', function(formElement) {
       	// your code goes here
       });
       </script>
       ```
   
 * Is this proper way to track the submit?
 *     ```
       <script>
       html_forms.on('success', function(formElement) {
       	__gaTracker.push(['_trackEvent', 'contact-form', 'submit', 'contact']);
       });
       </script>
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhtml-forms-event-tracking%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [DickRaney](https://wordpress.org/support/users/dickraney/)
 * (@dickraney)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/html-forms-event-tracking/#post-15229052)
 * I can say that my code above is not working, so would appreciate any help.
 *  Plugin Support [Michelle D.](https://wordpress.org/support/users/devmich/)
 * (@devmich)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/html-forms-event-tracking/#post-15236867)
 * Hi [@dickraney](https://wordpress.org/support/users/dickraney/),
 * I’m so sorry for the wait here.
 * I reached out to our developer team and confirmed instead of `__gaTracker()` 
   you’ll need to switch to using `__gtagTracker()`.
 * This also means your parameters need to change to…
 *     ```
       __gtagTracker('event', 'conversion', {
          event_category: 'form',
          event_label: 'contact-form',
          value: 1,
        });
       ```
   
 * In case it helps, using `__gtagTracker()` means you do not need to use `.push`,
   which is why it’s been excluded.
 * If you have multiple forms you would like to automatically track impressions 
   and conversions for without any coding required, you can take advantage of our
   [Forms Addon](https://www.monsterinsights.com/docs/how-to-get-started-with-the-forms-addon/).
   With this, you’ll also be able to view reports right inside of your WordPress
   dashboard at **Insights** » **Reports** » **Forms**.
 * If you’d like to learn more, or if you continue to have some trouble, please 
   reach out to us at [https://www.monsterinsights.com/lite-support/](https://www.monsterinsights.com/lite-support/),
   where our team will be happy to continue to assist.
 * Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘HTML Forms Event Tracking’ is closed to new replies.

 * ![](https://ps.w.org/google-analytics-for-wordpress/assets/icon.svg?rev=2976619)
 * [MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)](https://wordpress.org/plugins/google-analytics-for-wordpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analytics-for-wordpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analytics-for-wordpress/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analytics-for-wordpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analytics-for-wordpress/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Michelle D.](https://wordpress.org/support/users/devmich/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/html-forms-event-tracking/#post-15236867)
 * Status: resolved