SOP 169: How to Set Up Form Submission Events In Google Analytics 4 Via GTM
Set up a form submission event in Google Analytics 4 via Google Tag Manager.
You’re successfully tracking form submissions on your site.
Prerequisites or requirements:
You need to have edit access to Google Analytics 4 and Google Tag Manager account.
Tracking form submission events on your site allows you to create conversion goals around for lead generation, newsletter sign up and more.
Google Analytics 4 and Google Tag Manager.
When is this done:
After you’ve set up Google Analytics 4 on your site.
The person responsible for web analytics.
Set up a new form submission event in Google Tag Manager
-
Sign in to your Google Tag Manager account.
-
Select the container that is set up on your website.
3. Click “New Tag”.
4. In this SOP we will fire an event when a user submits a form on our site so that we will name this tag “Form Submission”. Then click on the Tag Configuration icon.
5. Select “Google Analytics: GA4 Event” from the list of tag types.
6. Next, key in your measurement ID and name this event, then click “Save”. This event name will appear (and be used) in Google Analytics to help you identify which form the user is submitting. If you have multiple forms, it’s recommended that you use a unique event name to help you identify them.
For example: “form_submission_leadmagnet_a”, “form_submission_leadmagnet_b”
Note: The measurement ID usually starts with "G-", which you can find under Admin → Data collection and modification → Data streams.
Find the measurement ID in the first row of the stream details.
If you can’t find any measurement ID, then you have not added Google Analytics 4 via Google Tag Manager. Follow this SOP to set up Google Analytics 4 via Google Tag Manager on your site.
7. You’ll see a “No Triggers Selected” pop-up, click “Add trigger”.
8. Adding a trigger informs Google Tag Manager when it should fire this event. Since this is a form submission event, it should fire when someone submits a form. Select “Form Submission” from the list of triggers.
Important: Google’s Form Submission Trigger only works for standard submit events. If you’re using a custom form solution, be sure to check with your developer or email marketing platform’s official documentation.
Note: If you are new to this, there is a chance that the “Form Submission” will not appear on your screen, you can proceed by clicking on the “+” button on your top right to add a new type of trigger.
9. Next, select “Form Submission” to edit its settings.
10. Tick “Check Validation” to enable the trigger under certain and true conditions such as “Page URL” “contains” “form submission page” and click “Save”.
11. Once you’re done with the tag and trigger configuration, click “Save”.
12. You should see the new tag in the dashboard. Click “Submit”.
13. Add a name and description to this Google Tag Manager change and click “Publish”.
Next, head to Google Analytics and set up this form submission event as a conversion goal.
Set up new form submission as conversion goal in Google Analytics 4
Note: In early September 2023, Google retired the Google Analytics 4 configuration tag, which can be found previously on the left sidebar. It is now replaced by a new tag template called Google Tag. Follow the steps below to proceed:
-
Login to your Google Analytics account .
-
Ensure you’ve selected the right property (the website where you’ve implemented the Google Analytics 4 tracking code).
3. Click on the gear icon or “Admin” followed by “Conversions” under “Data display” and click “New conversion event”:
4. Name this conversion event. It should be the same name as the one you set up in Google Tag Manager earlier . Then click “Save”.
5. You should then see the new conversion event listed in the conversion events list.
6. After you’ve set this up. It may take up to 24 hours for the event to show, provided that users are signing up on the page.
7. While you wait, you can then proceed to “verify if the form submission event” is set up correctly.
Verifying Form Submission Event is set up correctly
-
Sign in to your Google Tag Manager account.
-
Click “Preview”. This will activate Google Tag Manager’s Preview and Debug mode.
3. A new window (Tag Assistant) will launch. Add the URL of your website where the Google Tag Manager and the custom event were implemented and click “Connect”.
4. A new tab will open with your website loaded. You will also see a confirmation message that the Tag Assistant is connected.
5. Back to the previous tab (Tag Manager), and click “Continue”.
6. We can now start testing if the form submission event works. Head over to your website where the signup form is located. This should be the same page that you defined in step 11 of “Set up a new custom event in Google Tag Manager”.
7. Submit the form that you want to track.
8. Back in the Tag Assistant tab, you should see the list of events triggered on the sidebar. If you see the “Form submission” event that you set up earlier, then that confirms that the form submission event is firing correctly.
9. Now that you’ve verified the form submission is set up correctly. All you need to do is wait for the event to show up in Google Analytics.
10. Login to your Google Analytics account .
11. Click “Admin” or the gear icon → “Conversions” under “Data display”:
12. Make sure you’re in the “Conversion Events” tab, and check for the Form submission event that you set up.
13. If you see the event, that means you’ve successfully set it up!