This is a Google Tag Manager option for tracking form submissions that redirect users to a catchall thank you page, where the URL does not change.
To track form submissions with a unique thank you page URL, use Google Analytics goal tracking by destination.
The following steps will push a FormSubmit Trigger in Google Tag Manager to Google Analytics as an event, which can then be added as a conversion.
Step 1: Log into your Google Tag Manager Account
Create Variable
- Create a new variable.
- Configure: activate all form checkboxes.
- only have to do this once.
Create Form Trigger
- Select Triggers
- Create a New Trigger
- Title: Form Trigger
- Configuration: form submission trigger
- Default Settings: leave all boxes unchecked
- Save
- Preview/Debug Mode
Collect Form Identifiers
- Visit webpage
- Submit Form
- Watch what happens in the summary section, in the left column.
IMP Note:
- Form will automatically redirect you and you will be unable to see the recorded trigger.
- Right click to open thank you page in new tab.
- This will allow you to see the form page variables.
Back to Collecting Form Identifiers:
- Click on the .gtmformSubmit
- Select Variables in the center column.
- Inspect what GTM picks up from the form
- What can we use to specify the trigger: unique to the form
- Form ID if available
Additional Option
If the above does not work, view the button element by:
- Right click on the button
- Inspect
- Right Click
- Copy element
- Paste into word document
- Look for a unique identifier, such as Click ID
Turn General Form Trigger into a Specific Form Trigger
- Edit General Form Trigger Name to a Unique Form Action.
- Example “Form Trigger” becomes “Contact Us”
- “This trigger fires on: All Forms” change to “Some Forms”
- Select the unique Form element, for example:
- Form ID (or Click ID)
- Contains or equals
- Copy and Paste Form ID string, for example:
- “ninja_forms_form_1”
- Save
Send to Google Analytics by Attaching to a Tag
- Create a New Tag
- Name: “GA – Event – Name of Form Submit”
- Tag Configuration
- Choose a Tag Type: Google Analytic: Universal Analytics
- Tracktype: Event
- Category: Form Submit
- Action: Contact Us
- Label: (empty)
- Value: (empty)
- Select Google Analytics Settings
- Firing Triggers
- Choose the Form Submission trigger made in the previous step.
- Save
Check Your Work
- Refresh preview mode
- Refresh Webpage
- Resend Form Submission
- Watch for Event Tag Fire
- Look in Google Analytics
- Reports > Real Time
- Events
Turn Event into a Goal
- Google Analytics Goals
- Select Form Submission
- Type: Event
- Goal Details: enter the unique category, action, etc.
- Model whatever data is sent to GA from GTM.
- Save
Check Your Work
- Refresh Webpage
- Resend Form Submission
- Watch in GA
- Reports > Real Time
- Conversions
When everything looks correct – publish your GTM container.