Google Tag Manager is a tool that allows you to quickly and easily adjust tracking and marketing automation scripts for your pages from one centralized place. For more info on Google Tag Manager check out Google's documentation here.
Using the Unbounce/GTM Native Integration
Unbounce has an easy way to add the GTM code snippets to your page. Simply head to script manager and add a new script. Select "Google Tag Manager" from the dropdown menu and add your container ID:
The native integration via Script Manager will automatically place the GTM code on your pages. It will send a custom event to GTM when a visitor submits your form.
Inside GTM you should use Custom Event triggers (for the `gtm.formSubmit` event) instead of Form Submission triggers, to avoid your tag firing twice.
Here are step by step instructions on how to set up your Custom Event triggers properly in GTM:
- Follow Google's instructions on how to set up custom event triggers.
- When you reach the Trigger Configuration step, enter the following information:
- For Trigger Type, select Custom Event.
- For Event Name, use gtm.formSubmit.
- Leave Use regex matching unchecked.
- For This Trigger Fires On, select which option suits your needs.
Unbounce forms are submitted via an AJAX POST request, which makes it difficult to capture the form submission event when not using our native GTM integration.
Manually Setting Up Your Google Tag Manager On A Page
- Republish your page so that the changes take effect.
Now you can control the tags included on your landing pages from Google Tag Manager!
If you want a little help with Google Tag Manager, check out Tag Manager Help below: