HubSpot Ideas


Integrate Marketing Free Lead Flows with Google Analytics

Add the ability to track events (submissions) with the marketing free lead flows to trigger Google Analytics.

27 Replies

This is a must, I can't believe its taking this long to get this resolved.


I have a solution! 


A colleague, far cleverer than I, worked out a solution using Google Tag Manager, so you'll need to be relatively well versed in GTM should you wish to follow suit as I'm undoubtedly going to miss some important information in translation.


GTM can monitor all events and activity on your website including the submission of pop-up lead flows. By creating a monitoring event using the inspect panel on the webpage to find the form URL and submission class form he was able to have the event track successful submissions. This event can then be used to trigger a conversion within Analytics.


 Very important to be able to continue to use Google Analytics...


Hey all,


I have a different solution other than using GTM ninja skills that's been working pretty well for me. I've set up a "blank" html page that loads the regular GTM (or Google Analytics) code then redirects to the download offered on the Lead Form with javascript. I know almost nothing about javascript so don't be intimidated if you're new to it. Here's the base of the code I use if you want to replicate it.


<!doctype html>
<meta charset="utf-8">
<title>cfo guide download</title>
{{ standard_header_includes }}
<!-- Google Tag Manager [insert your own GTM code in this section]-->
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
<!-- End Google Tag Manager -->
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src=""
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

{{ standard_footer_includes }}
<script type="text/javascript"> window.location.href = "[put your document link here]"; </script>


This has worked perfectly for me for tracking these downloads. The main downside to this method is you have to create a new page (and a new template, I think) for every document you want to use. I'd love some feedback on this method if you have any insights. Let me know if you have questions on how to do this. 



Here's how I did it with Google Tag Manager:


Create a trigger as below:

Screen Shot 2018-09-06 at 13.46.54.png


Then a tag:


Screen Shot 2018-09-06 at 13.47.38.png


And it works a treat 🙂


The lead flows are what's called pop-up forms nowadays, right?

What's the status of this change?


It would be very useful to track pop-up forms with Google Analytics.

We've outsourced Google Adwords but our agency cannot monitor this part of the conversions they generate.

HubSpot Alumni

Hi HubSpot Community,


My name is Joe, I'm the Ideas Forum Manager. I've been in contact with the HubSpot product team about this Idea, and I wanted to provide a quick update.


We appreciate all the feedback you’ve shared here to help our team evaluate this feature request. However, at this time, this functionality is not something our team is planning to build into HubSpot. This is certainly subject to change in the future, so feel free to leave feedback if you'd like. We'll update this thread if our plans change.

Ideas Forum Manager