Widget form submit conversion tracking with Google Tag Manager
You can track widget form submits easily with Google Tag Manager custom events, in this article we will show you how!
Santeri
Last Update a year ago
In this article we will walk through how to catch Trustmary widget form submits with Google Tag Manager. This allows you to track these conversions in many different channels, including:
- Google analytics
- Facebook ads
- Linkedin ads
- Twitter ads
How the conversion tracking works for widget form submits
On each form submit we send a datalayer push custom event with the name:
trustmary.FORM_SUBMIT
The datalayer push also contains the widget_id as a value which enables you to track different forms separately if you like.
Below is an example of the data layer values after the event:
![](https://tawk.link/63c911a247425128790e845b/kb/attachments/bZ3QRXhN0T.png)
How to create the conversion tracking with Google Tag Manager
- Navigate to Google Tag Manager
- Create a trigger
- Under Other choose "Custom event"
- Event name: trustmary.FORM_SUBMIT
- Name the trigger and save it
- Create desired tag to drive the conversion data to channel of your choice, for example Google Analytics
Separating different widget form submits:
If you want to separate different widget forms with widget_id:
- Create new data layer variable with name: widget_id
- Create a new trigger
- Choose "Custom event"
- Event name: trustmary.FORM_SUBMIT
- Choose "Some Custom Events"
- Under: "Fire this trigger when an Event occurs and all of these conditions are true" choose the datalayer variable you just created
- Choose equals
- And write the widget_id you want to track separately
- Save the trigger
- Create desired tag to drive the conversion data to channel of your choice, for example Google Analytics
How to find widget id?
- Go to Widgets at app.trustmary.com
- Choose the widget you want to find the id for
- In editor view, check the page path from the URL (for example: https://app.trustmary.com/widget/HZsl_qeHbf). The id found after /widget/ is the widget id, for example in the case: HZsl_qeHbf