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.
- Script v3
- Script v2
With script v3, HubSpot forms are tracked as soon as form tracking is on. Form tracking covers every supported form type, so there is no separate option to enable:
<script>... formTracking: true, ...</script>
To track only some form types, see Choosing which forms are tracked.
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:
- Script v3
- Script v2
HubSpot forms are always tracked as HubSpot forms. The naming options for HTML forms do not apply to them.
- 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>