Articles on: Widgets

Widget form submit conversion tracking with Google Tag Manager

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:



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

Updated on: 19/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!