Form tracking: Hubspot (auto-identify script)

Updated by Rune Juul-Stokholm

Please only implement the scripts below IF you are currently using the legacy version 1.0 of Dreamdata's Web Tracking script. Otherwise, we recommend using the new Web Tracking script, version 2.0, which has built-in support for form tracking, intent sources and other integrations.

Adding Hubspot form tracking with auto-identify script

For customers using Hubspot Forms, add the following auto-Identify script at the end of the <head /> section.

<script async id="dreamdata-form-identify" src="https://cdn.dreamdata.cloud/scripts/identify-form/v1/identify-form.min.js" data-hubspot-forms="true"></script>

If you are using Google Tag Manager, then you have to use this script instead because Google Tag Manager strips data parameters:

<script>
var script = document.createElement('script');
script.async = 'true';
script.id = 'dreamdata-form-identify';
script.src = "https://cdn.dreamdata.cloud/scripts/identify-form/v1/identify-form.min.js";
script.setAttribute('data-hubspot-forms', 'true');
document.head.appendChild(script);
</script>


How did we do?