Form tracking: Google Tag Manager (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.

In this article, we'll show you how to set up your form tracking using Google Tag Manager through auto-identify script.

Adding Google Tag Manager via auto-identify script

We recommend that you do two separate custom tags.

One for tracking forms (as shown below) and one for web tracking (find web tracking guide here).

  1. To install the auto-identify form tracking script using Google Tag Manager start by opening up Google Tag Manager.
  2. Click on 'Add a new tag'.
  1. Name the tag in the top left corner e.g. 'Dreamdata Form Tracking' and then click on 'Tag Configurations'.
  2. Pick 'Custom HTML' from the list under the header 'Custom'.
  3. Copy the script below: Paste in this script as showed in the image below:
    1. <script async id="dreamdata-form-identify" src="https://cdn.dreamdata.cloud/scripts/identify-form/v1/identify-form.min.js"></script>
    2. If you are using Hubspot Forms, please apply the below script instead:
      <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>
    3. Paste in this script as showed in the image below:
  1. Now click on 'Triggering' just below from where you added the script and pick all pages as a trigger.
  2. Click 'Save' in the top right corner.
  3. The last thing you need is to submit the tag to your workspace by clicking 'Submit' in the top right corner of the home screen:
  4. The tag will now immediately start firing.
    1. Test if you have submitted the script correctly by filling in a form on your website.
    2. Then go to the Dreamdata app and click Engagement -> Real-Time.
      If the script was added correctly, you should see the form you just submitted after 3 minutes.
Note: After tracking is set up, it can take up to 48 hours for the first data modelling process to complete. Once done, your Engagement reports will open up.


How did we do?