Tracking Hubspot Forms with auto-identify script

Rune Juul-Stokholm Updated by Rune Juul-Stokholm

Tracking Hubspot Forms 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?

Setting up tracking with Segment

Tracking iframes with auto-identify script

Contact