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 widget_id as a value which enables you to track different forms separately if you like.

Below is example of data layer values after the event:

How to create the conversion tracking with Google Tag Manager

  1. Navigate to Google Tag Manager

  2. Create a trigger

  3. Under Other choose "Custom event"

  4. Event name: trustmary.FORM_SUBMIT

  5. Name the trigger and save it

  6. 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:

  1. Create new data layer variable with name: widget_id

  2. Create a new trigger

  3. Choose "Custom event"

  4. Event name: trustmary.FORM_SUBMIT

  5. Choose "Some Custom Events"

  6. Under: "Fire this trigger when an Event occurs and all of these conditions are true" choose the datalayer variable you just created

  7. Choose equals

  8. And write the widget_id you want to track separately

  9. Save the trigger

  10. Create desired tag to drive the conversion data to channel of your choice, for example Google analytics

How to find widget id?

  1. Go to widgets inside app.trustmary.com

  2. Choose the widget you want to find id for

  3. In editor view, check the page path from the url (for example: https://app.trustmary.com/widget/HZsl_qeHbf)

  4. The id found after /widget/ is the widget id, for example in the example above: HZsl_qeHbf

Did this answer your question?