HubSpot Forms
Our automatic form tracking supports tracking embedded HubSpot forms on your website. It triggers when a valid email is submitted as part of a form.
To enable HubSpot form tracking, set the hubspot option to true in your
script as done below.
<script id="init-dreamdata">
...
formTracking: {
hubspot: true,
},
...
</script>
Customizing the Event Name
We support the following options to customize your HubSpot form tracking event name:
-
Most common: For sites with multiple scripts instead track the form as an html form and use one of the naming options found here.
-
If you only have one form on your site use
eventName. Custom event name for tracking, overriding default "form-hubspot-submit".
<script id="init-dreamdata">
....
formTracking: {
hubspot: {
eventName: 'hubspot-form-submit',
}
},
...
</script>
- Custom option: Add a custom function that populated eventName based on which type of form is being tracked.