Free Google Tag Manager Template for HubSpot Forms

Use this GTM template to send a hubspot_form_submitted event each time a HubSpot form is successfully submitted. You can then use this to trigger your conversion tags for Google Ads, Meta Ads, GA4 and more.

HubSpot Forms Listener

Tag Configuration

Tag Type

HubSpot Forms Listener by Converly

Community Template Gallery ยท converlyio

Detects successful HubSpot form submissions and sends a hubspot_form_submitted event to Google Tag Manager

Firing Triggers

All Pages

Page View

Google Tag Manager is probably the most common way to set up conversion tracking for Google Ads, Meta Ads, Google Analytics, etc.

But the problem is telling Google Tag Manager that a HubSpot form was actually submitted. Forms made in HubSpot's current form builder load inside an iFrame on your page, so GTM's built-in form submission trigger can't see them at all. Others have written ways around this, but those largely rely on HubSpot sending a message called 'onFormSubmitted' when the submission goes through, which their newest form builder doesn't do.

So how are you supposed to set up accurate conversion tracking for HubSpot forms?

This free template takes care of it. Add it to your container from Google's Community Template Gallery, and every successful HubSpot form submission turns up in GTM as a hubspot_form_submitted event (which you can then use to fire your conversion tags from).

How to Use the Template

There are 3 pieces to set up. You add the template, you create a Trigger in Google Tag Manager, and you set your conversion tags to fire off that Trigger. Once done, HubSpot form submissions on your website will be sent to Google Ads, Meta Ads, Google Analytics and anywhere else you configure.

1

Install It

To begin, add the template to your container from Google's Community Template Gallery and make sure it loads on all of your pages.

  1. 1

    Inside your GTM container, head to Tags using the left menu and hit New to start a blank tag. Clicking the Tag Configuration box then brings up every tag type available to you.

    An empty new tag in Google Tag Manager with its Tag Configuration box ready to be filled in
  2. 2

    Click Discover more tag types in the Community Template Gallery, which sits at the top of that list. Once the gallery is open, type "HubSpot Forms" into the search box.

    The tag type list with the link to the Community Template Gallery at the top
  3. 3

    Select HubSpot Forms Listener (Converly is listed as its publisher). Hit Add to workspace, and when a confirmation window appears, click Add.

    The HubSpot Forms Listener listing from Converly in the Community Template Gallery, showing the Add to workspace button
  4. 4

    Set Triggering to All Pages, call the tag something easy to spot (for example HubSpot Forms Listener) and save it. This tag will now load on every page of your site and essentially just sit there listening for successful HubSpot form submissions. When it detects one, the tag pushes an event named hubspot_form_submitted into the dataLayer.

    The HubSpot Forms Listener tag with All Pages selected as its trigger
2

Create the Trigger

With the listener installed, you can then use it to build a Trigger in Tag Manager that fires when hubspot_form_submitted appears in the dataLayer.

Templates from Google's gallery can't include Triggers, which means you have to build this part yourself. To do so, go to Triggers in the left menu, click New and copy the settings from the screenshot below.

Exact Settings

Trigger Type
Custom Event
Event Name
hubspot_form_submitted
Name It
CE - HubSpot Form Submitted

The CE - HubSpot Form Submitted Custom Event trigger, configured and ready to save
3

Connect Your Tags

Last of all, you need to build a conversion tag for each destination you want to send conversions to (Google Ads, Google Analytics, Meta Ads, etc), and attach the Trigger from step 2 to every one of them. Here's how to do that for 3 popular destinations:

Example 1: Google Analytics

Create a new tag and select Google Analytics: GA4 Event as the tag type. Enter your Measurement ID (find it under Admin in your GA4 property) and enter a name for the event that appears in GA4 (something like generate_lead or form_submitted). Finally, choose the Trigger you built in step 2 in the Triggering section. GA4 will now receive an event every time a HubSpot form is successfully submitted on your website (and don't forget to mark it as a key event if you want it to count as a conversion in your acquisition and funnel reports).

A GA4 Event tag that sends generate_lead whenever CE - HubSpot Form Submitted fires

Example 2: Google Ads

To send conversions to Google Ads, create another tag (but this time with the type Google Ads Conversion Tracking). It asks for the Conversion ID and Conversion Label of your conversion action, which you can copy from the Goals section of Google Ads. Finally, choose the Trigger you built in step 2 in the Triggering section. Google Ads will now receive a conversion every time a HubSpot form is successfully submitted on your website.

A Google Ads Conversion Tracking tag set to fire on CE - HubSpot Form Submitted

Example 3: Meta Ads

Not surprisingly, there's no pre-built Meta tag in Google Tag Manager. So to set this one up, you can use a Meta Pixel template from the community gallery, or write a Custom HTML tag that fires Meta's standard Lead event. Once done, choose CE - HubSpot Form Submitted (the Trigger you built in step 2) to fire it. Meta Ads will now receive a Lead event for every successful HubSpot Forms submission on your site.

A Custom HTML tag that sends Meta's Lead event when CE - HubSpot Form Submitted fires
4

Test in Preview Mode

It's worth testing all of this before you publish. To do that, hit Preview in Google Tag Manager, which opens your website in the Tag Assistant view. Then visit a page with a HubSpot form, fill it in and submit it once. Here's what you're looking for:

  • Exactly one hubspot_form_submitted event in the left hand timeline per submission.
  • Your conversion tags appearing in the Tags Fired list.
  • Your HubSpot Forms form's ID shown against form_id under the Data Layer tab.

Once everything is tested and working, hit Submit, add a version name and click Publish to push the new container version live.

Tag Assistant after a test submission, with the event open and the tags that fired listed

What It Sends

Each time a HubSpot form is submitted on your website, the HubSpot Forms GTM Template adds the following to the dataLayer:

window.dataLayer.push({
  "event": "hubspot_form_submitted",
  "form_id": "form-id"
});
KeyTypeWhat It Is
eventstringAn event that always has the same name (hubspot_form_submitted). Your GTM Trigger listens for this event.
form_idstringThe ID of the HubSpot form that was submitted. You can use this as a filter, so you only fire certain conversion tags for certain forms (like a Book a Demo form but not a newsletter signup form). The ID is actually the long string of letters and numbers in the address bar when you open the form in HubSpot.

Permissions & Privacy

Why Does Google Tag Manager Show a Warning?

Google shows a list of permissions on every template listing in its gallery. Because this tag fetches its code from a Converly server, that list includes a red "Injects scripts" warning. It will look a bit like this:

  • Injects scriptshttps://gtm-templates.converly.io/hubspot-forms-listener.js

    Fetches the HubSpot Forms listener script from Converly

Why This Is Actually The Best Approach

  • Security GTM only lets this tag pull code from gtm-templates.converly.io, so it can't actually load anything else on your website without you knowing.
  • Automatic Updates We regularly test it against live HubSpot forms, and if it needs updating (because HubSpot updates its form builder, for example), we can ship a fix to that script once and every website running the template gets the new version automatically.

Compatibility

This template is built on the same core code Converly uses to detect HubSpot form submissions for its customers, and it has been tested against real HubSpot forms from both the new and legacy editors.

SetupStatusNote
Forms from HubSpot's new editorWorksOne event is sent per successful form submission
Forms from HubSpot's legacy editorWorksOne event is sent per successful form submission
Submissions HubSpot rejectsWorksIf HubSpot shows an error (a required field left blank, for example), no event is sent.
Correcting errors and resubmittingWorksAfter the visitor fixes the errors and HubSpot accepts the form, one event is sent.
Double clicking SubmitWorksOne event per accepted submission, however many times the button is clicked.
Two copies of the same form on one pageWorksEach copy that is submitted sends its own event.
New and legacy forms on the same pageWorksEach form sends its own event with its own form ID.
Redirecting to a thank you pageWorksOne event is sent per successful form submission

Tested with HubSpot Forms New and legacy editors, Nov 2026, Chromium 147.0.7727.15.

Troubleshooting & FAQ

Open Preview and check whether the listener tag fired as the page loaded. If it didn't, its trigger is likely set to the custom event instead of All Pages.

The template only fires once HubSpot has accepted the submission. If HubSpot shows an error on the form (a missing required field, for example), nothing is sent until the visitor fixes it and submits again. It also relies on HubSpot's own embed script running on the page, so a form that hasn't loaded properly can't be counted.

Ad blockers and strict browser privacy settings can stop GTM from loading at all, so always test in a clean browser window.

Changelog

VersionDateChanges
v1.0.016 Nov 2026Launched in the gallery.

Our detection script improves over time, and every improvement reaches your website without you lifting a finger. You'll find each one listed below.

Where This Template Falls Short

Put simply, the template lets Google Tag Manager know a HubSpot form was submitted successfully. That's a solid start, but it falls short in a couple of different ways:

Gets Blocked By Ad Blockers and Browser Settings

Lots of people browse with an ad blocker installed or with tight privacy settings enabled in their browser. Either of those can prevent Google Tag Manager from loading when the visitor lands on your site, and if it doesn't load then nothing the visitor does can be tracked (including submitting HubSpot forms).

Doesn't Capture Lead Details

To accurately track conversions, Google, Meta, ChatGPT, etc. want you to send the lead's name, email address and phone number alongside every conversion. All this template passes on is the form ID. It does not capture that data.

Doesn't Capture Click IDs

When someone clicks an ad on Google, Meta, etc., they land on your site with a unique Click ID in the URL. If you capture and send that ID back to the ad platform with each conversion, the platform can match it back to the original ad click with 100% certainty. This template does not collect and send Click IDs.

Can Break Without Warning

There's no history of conversions inside Google Tag Manager and no email when something fails. So a change to your HubSpot form, or an edit in Google Tag Manager, could stop conversions from flowing, and you'd only notice when your ad accounts report 0 conversions weeks later.

The Proper Way to Send Conversions to Google Ads, Meta Ads & More

The better way to send conversions to ad platforms is with Converly. Converly is a dedicated conversion tracking tool built to send conversions to Google Ads, Meta Ads, ChatGPT Ads, etc. when a visitor submits one of your HubSpot forms.

A Converly Conversion Flow passing HubSpot Forms conversions to Google Ads and Meta Ads

Easy to Set Up

You build your conversion flow in a drag-and-drop builder. There's nothing to code and no complex settings to work through.

Sends Data Server-Side

Converly sends conversions to Google's, Meta's, and every other platform's servers directly, so ad blockers or privacy settings cannot get in the way.

Sends More Data

Converly sends the lead's name, email, and phone, plus the Click ID, IP address, and user agent, with every conversion. Google, Meta, etc. then use these to match the conversion back to a real person and to the ad that brought them in (so your conversions actually get counted and appear in your reports).

Conversion Log & Alerts

Converly keeps a log for every conversion, showing what data was captured, what it sent to each platform, and whether that platform accepted it. You can also set up email notifications so you'll know straight away if your conversion tracking ever breaks.

100+ Tools, 20+ Destinations

HubSpot is one of more than 100 form, booking and chat tools Converly works with, and conversions can be sent to 20+ ad platforms and analytics tools with no code.

Free Support From Experts

Got issues? Our team has more than 20 years experience in tracking and analytics, and we'll happily jump on a call or help you via email. Google doesn't provide support for Google Tag Manager, so you're on your own if you use that.

This Template vs Converly

GTM TemplateConverly
Detects HubSpot Forms submissionsYesYes
Delivery methodFrom the browserFrom Converly's servers
Lead name, email & phoneNot capturedSent every time
Click ID, IP address & user agentNot capturedSent every time
Alerts when tracking failsNot PossibleInstant email plus a conversion log
Help when you need itNoneFree from our experts

Start Your Free Trial

Converly is free to try for 14 days, works with HubSpot forms, and can send conversions to Google Ads, Meta Ads & 20+ other destinations.

No credit card required

About the author

Aaron Beashel
Aaron Beashel

Aaron is the founder of Converly. With over 15 years of experience in digital marketing and SaaS, he's passionate about helping businesses track and optimise their ad conversions.

Start your free trial

Easily send conversions to your ad platforms and analytics tools.
No code required.