InstaPage Form Event Listener
How to track Instapage Form Submission with google tag manager
To measure successful Instapage form conversions effectively through Google Tag Manager, follow these steps: Begin by creating a custom HTML tag in GTM.
Copy the Instapage form event listener code and paste it into the custom HTML tag.
Subsequently, trigger this tag on pageview or DOM-Ready.
Proceed to the triggers section and establish a custom event trigger type [formSubmissionSuccess].
This trigger is designed to detect the dataLayer event emitted by the Instapage form event listener upon successful form submission. Utilise this trigger to execute marketing tags or pixels, such as Google Analytics, Google Ads, Facebook Pixels, Mixpanel, Piwik Pro, etc.
Additionally, ensure that your implementation adheres to privacy regulations. Leverage trigger conditions in Google Tag Manager to specify the pages on which the conversion should be recorded.
It’s essential to note that, following a series of tests, it has been observed that the dataLayer may not function on all Instapage forms, particularly in cases with multiple forms on a page. In such scenarios, employing the Google Tag Manager form trigger type proves helpful.
The code was found on The Instapage documentation.
<script> window.instapageFormSubmitSuccess = function (form) { window.dataLayer = window.dataLayer || []; window.dataLayer.push({ 'event': 'formSubmissionSuccess' }); console.log('form submitted') }; </script>