Hubspot forms read-through

Hubspot is a widely used CRM solution for customer management and lead tracking. Within Hubspot you can easily gain insight into your leads and follow up on them within the organization. Hubspot offers a standard solution for lead forms that you can place on the website using a script. In the background, an iframe is loaded into the website where you want to add the lead form.

But to get real insight into Hubspot form tracking, you’ll need to make some adjustments yourself. Many solutions have already been offered on the Internet on how to eventually get these form submit events visible in Google Analytics as well. However, this goes on a very limited scale, in which you have to organize quite a bit yourself to get visibility of what form has been submitted.

Hubspot Form ID

When you’ve added Hubspot to your website and you also choose to use Hubspot forms for lead generation, you’ll want to be able to tell the difference in which form was submitted. By implementing the script below via Google Tag Manager, you at least ensure that this becomes measurable. However, you will still need to use a lookup table in Google Tag Manager to convert the Hubspot Form ID to a recognizable name.

The script to implement Hubspot form tracking in Google Analytics

The following is a brief roadmap to accomplish this:

Step 1 – Create a Custom HTML tag in Google Tag Manager
Step 2 –
Place the above code in this tag
Step 3 –
Add the trigger All pages – If you want this to be covered by marketing cookies, make sure you have a custom trigger.
Step 4 – Publisher the Google Tag Manager

From now on, Hubspot form submits will be followed by an event called; hubspot-form-success

You can monitor this by opening in the debug view of Google Analytics 4 and testing a form yourself.
If you want more insight into which form ID was used, add the following datalayer variable to Google tag Manager: {{dlv – hs-form-guid}}

This is just the first step in measuring Hubspot forms on your website in Google Analytics 4. Want to get more insights into your forms and also read certain fields, for example, when people select an option, or you want to use Enhanced Conversions?

Then contact us using the form below!

Author: Paul Gudde

Function: Founder

Active since: 2007

Number of items: 24

LinkedIn profile

Specializations: Google Analytics, Google Tag Manager, Google Ads, Google bigquery, Server Side Tagging

Let’s Make Things Happen

“Take the step to data enrichment today. Make the most of Google Analytics by leveraging our specialist knowledge.”

“Thanks to Paul’s implementation, we were finally able to get insight from Analytics to come up with actions. Paul clearly has experience in b2b marketing and puts us as a customer first in doing so”

Luuk van Dorp

Sales marketer WEX

Free Support & Advice Request

Attributions needs the contact information you provide to contact you about our products and services. You can unsubscribe from these messages at any time.