Track Hubspot forms with Google analytics. No Google Tag Manager!

2023 Update - Let us install conversion tracking for you.

You want to track Hubspot form submissions and send them as a conversion to Google Ads, Google Analytics, or Meta Pixel. Many clients struggle with complex and outdated tutorials, and are usually not happy with the result or how they’ve spent that time.

Introducing:

Hubspot form conversion tracking Service

✅ We’ll implement Hubspot tracking in under 1h.

✅ We test the Hubspot form conversion setup fully.

✅We’ll show you a video of the conversions being tracked, in real time. ✅ We handle all platforms, Google Analytics, Google Ads, Meta & others.

✅ We use the latest features, clean setup, no outdated unreliable "workarounds” like redirects.

✅ And we are available to clean up your messy, outdated tags and fix any other conversion tracking problems.

Hubspot form conversion tracking Service

The quickest and easiest way on planet Earth to track Hubspot Form Conversions.

Installation by a professional. Guaranteed to work. Implemented in 1h (or less). Fully tested, including a video where we show the conversions being tracked in real time. Or your money back.

Why I made the Hubspot Form conversion tracking service?

Most conversion tracking tutorials are written by amateurs. I just read a Hubspot form conversion tracking tutorial, which suggested using Google Tag Manager “element visibility” to track Hubpost conversions. It did not make any sense to me, but I still tested it. Did it work? Absolutely not. Google Tag Manager is not able to track anything happening inside an iFrame.

Tutorials suck, and always miss something important

There are countless tutorials on how to track Hubspot form conversions with Google Tag Manager. However, in our experience, they always miss something. Perhaps they only show how to do it for one platform like Google Analytics, or maybe the tutorials are outdated and are using Google Analytics Universal Analytics (which is practically dead).

Most conversion tracking tutorials are written by amateurs. I just read a Hubspot form conversion tracking tutorial, which suggested using Google Tag Manager “element visibility” to track Hubpost conversions. It did not make any sense to me, but I still tested it. Did it work? Absolutely not. Google Tag Manager is not able to track anything happening inside an iFrame.

Did you know, that a redirect to thank you page is a bad way to track conversions, as it often messes up the traffic source, doesn’t support enhanced conversions, and requires insane effort if you want to track multiple forms?

Did you know, that Google Analytics 4 requires any custom parameters sent with events, to be registered as custom dimensions?

Did you know that Google Analytics 4 no longer has “goals”, as they’re replaced with conversions?

Do the tutorials include the page path and title in the Meta Pixel conversion to see which form was sent?

Do the tutorials use an outdated method, like redirects to a custom thank you page, which is very likely to mess up your Google Analytics Source / Medium and make the conversion data practically useless?

Do the tutorials explain how to mark the Hubspot form GA4 event as a conversion?

About Enhanced conversion tracking for Hubspot Forms

This is the part other tutorials skip.


The content below is the original blog post.

I recommend you skip it and just hire me to track your Hubspot forms. If you’re not a pro and decide to “do it yourself”, you’re probably going to have a bad time, and in most cases, a faulty conversion tracking setup that’s not tested correctly, has faulty GA4 traffic source, duplicate conversions and and not getting Google Ads Enhanced conversions.

In my Hubspot conversion tracking service, we can use the personal data from the form to make conversion tracking more accurate, when browsers are cracking down on cookies and device ID’s due to privacy concerns. That’s why I recommend you hire a pro to implement the Enhanced conversion tracking for Hubspot forms.

The Enhanced Conversion Tracking by Google, is soon arriving in Google Analytics 4 as well, making it even more important. So I definitely recommend a professional, tailored Hubspot conversion tracking setup, to make sure you have the best conversion setup possible, and use the latest tracking technologies.



Original post

The content below requires an update, but I’m now focusing on the Hubspot form-tracking service, as that’s what most of my clients request.

Want to track Hubspot form submits with Google Analytics? Two ways to do that.
1) The harded ‘pro’ way by using Google Tag Manager (tutorial here)
2) This quick & dirty easy method.

I recommend the professional method but most people struggle with Google Tag Manager so here’s the easiest way ever.


UPDATE MAY 2022. READ!

Some will love this – other’s are gonna hate. As I have a mortgage to pay (and my mom deserves flowers bought on Mother's Day) I’ve decided to turn this into a product. Buy the code snippet to track Hubspot forms in 1 minute.

PAID PRODUCT PROS
+ If you have problems, I will help you. Any problems – I’ll help fix them. Reach me 1-on-1 via WhatsApp or email. We’ll make it work or your money back.
+ I asked some people how it worked and they said it didn’t. With paid product, I can fix it and every time improve the code. With a blog post, people just leave.
+ I’ll take feature requests.
+ I can improve the new GA4 version as there are more options for tracking
+ You’ll be supporting an indie freelancer who pays taxes. More books in the libraries and fixed roads. Yay!

CONS

- It costs a few bucks. Sorry 😞

(If you’re a non-profit or broke you can send me an email and we'll see what we can do.)



Buy it here👇👇👇👇

Hubspot Form Conversion Tracker
$39.00

Do you want to track Hubspot form submits, and send conversion data to Google Analytics, Google Ads and Meta Pixel? Get this easy prebuilt setup to track Hubspot conversions in 5 minutes.

Quantity:
Add To Cart


How can I track Hubspot Form submissions in Google Analytics?

You can do a pro setup with Google Tag Manager. I have another tutorial for that here. And you really should. However I’ve seen many people struggle with it so I wanted to share a quick snippet that’s the quickest method ever.

Video tutorial

The code snippet for copy-pasting

Sorry! Turned into a paid product. A freelance developer’s gotta eat 😞

Tracking Hubspot Form views in Google Analytics

People also want to track views of Hubspot forms in addition to form submits. This code will track form views instead of form submits


Tracking Hubspot Form without Google Tag Manager

To be honest, you should use Google Tag Manager if possible. Especially definitely if you’re tracking more than just a few things, and definitely if you’re sending tracking info to multiple services (e.g. Google Analytics, Google Analytics 4, Google Ads, remarketing apps etc) GTM’s the best way.

The problem is that unless you know what you’re doing with Google Tag Manager, it’s often painful, messy, and probably won’t work.

So. In the meantime, I wanted to share a quick copy-paste that definitely works. You can then hire a pro like me to implement all your tracking stuff professionally. But this will get you started.

Tracking the source of Form Submissions in Hubspot with Google Analytics

You can see data about your form submits inside Hubspot. But this lacks context, where did they came from, was it Google Ads? Organic? A campaign? Also you’ll want to have all or most of your analytics data in one place and that’s usually Google Analytics.

Trigger Google Analytics Event for Hubspot Form Submission

I see glorious blog post with titles like Super Easy Way to Track Hubspot Forms in Google Tag Manager and Analytics or The Easiest Way To Setup Hubspot Form Tracking In Google Analytics. They’re awesome (they are. I use them myself for my clients). You should use them if it’s possible. But for most marketers Google Tag Manager stuff as too complex.

We’ll just skip Google Tag Manager and add a quick little snippet. It’ll work perfectly as a quick fix when you’re in a hurry.

How does tracking Hubspot Forms with Google Analytics work?

Hubspot form is inside an iFrame. That’s kinda like a window into another website. And your website normally can’t affect stuff inside that window. However, Hubspot is kind enough to send us (the parent window, your website that is) a message we can listen to with javascript. It looks llike this


{     "type": "hsFormCallback",     "eventName": "onFormSubmit",     "id": "b9119922-fcf2-40e3-8157-c9b361c20f5a",     "data": [         {             "name": "email",             "value": "EXAMPLE@EXAMPLE.COM"         }     ] }   //AND  {     "type": "hsFormCallback",     "eventName": "onFormSubmitted",     "id": "b9119922-fcf2-40e3-8157-c9b361c20f5a",     "data": {} }

You can then go to Real-Time view of your Google Analytics and see those form submits happening.

How to get the specific Hubspot form name tracked?

By default we only get the ID of the form, not it’s name. Tricky. A workaround is to add a hidden field with a wanted form name as a default value, and grab that info to analytics. All field values can be found from the

Hubspot form tracking with google analytics - form name hidden field

This event has all the filled form info, including the hidden field for form name:

eventName:'onFormSubmit'


<script> //muista myös tuttu message listener jonka löysin acuity iframe parent redirect hommai varten var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; var eventer = window[eventMethod]; var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"   // Listen to message from child window eventer(messageEvent,function(e) {   var key = e.message ? "message" : "data";   var data = e[key];   //run function//   console.log("data");   console.log(data)       if( data.eventName.includes("onFormSubmitted")  &&  data.type.includes("hsFormCallback") ){     console.log("if onFormSubmitted successs & data.type.includes hsFormCallback")           //Universal analytics inside gtag 2022         gtag('event', 'Form Submit', {           'event_category':'Form submits ',           'event_label': document.location.pathname,           'value': "value"         });       }       },false)      </script> 


Need help? Hire me to do all this boring stuff for you!

If you need help, just shoot a message to @hire. We can just whatsApp the details, I’ll code this stuff for you (usually within a day or two) and send a payment link you can pay with credit card, Apple Pay etc.

Previous
Previous

How to install Google Analytics to Squarespace (UPDATED METHOD 2022)

Next
Next

Cloning the navigation menu to footer in Squarespace