Skip to content
🚀 Find us on Product Hunt

Google Ads HubSpot Form Submission Event Tracking for WordPress

Quick answer: Select Google Ads and the HubSpot Form Submission event in the free container builder wizard, enter your tracking ID, then import the generated file into Google Tag Manager - the trigger is wired up automatically, no manual setup required.

Configure the HubSpot Form Submission event so Google Ads fires correctly on your WordPress store, then generate an importable Google Tag Manager container - no manual tag, trigger, or variable setup required.

Generate my Google Ads HubSpot Form Submission container →

How it works

  1. Open the container builder with Google Ads and the HubSpot Form Submission event already selected.
  2. Enter your tracking ID/pixel credentials for this platform.
  3. Generate and download the GTM container JSON file.
  4. In Google Tag Manager: Admin > Import Container > choose the file > Merge into a new workspace, then verify in Preview mode before publishing.

Track HubSpot Form Submission with other platforms

How this event is built in your container

HubSpot Form Submission is detected automatically. HubSpot's own embed script (both the current hbspt.forms.create embed and the legacy iframe embed) broadcasts a window postMessage event - {type: 'hsFormCallback', eventName: 'onFormSubmitted'} - the moment a visitor successfully submits any HubSpot form on the page.

This container includes a small Custom HTML tag, firing on All Pages, that listens for that native event and pushes dataLayer.push({ event: 'hubspot_form_submission', ... }) itself - unlike this plugin's other events, there's no code for you to add manually.

For this to work, though:

For reference, here is the exact script this container's bridge tag runs:

(function(){
  if (window.__gtmcbHubspotFormBridge) { return; }
  window.__gtmcbHubspotFormBridge = true;
  window.addEventListener('message', function (event) {
    var data = event.data;
    if (!data || data.type !== 'hsFormCallback' || data.eventName !== 'onFormSubmitted') { return; }
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      event: 'hubspot_form_submission',
      hubspot_form_guid: data.id || data.formGuid || '',
      hubspot_form_target: (data.meta && data.meta.formName) || ''
    });
  });
})();

The Google Ads tag itself is added automatically and wired to this trigger - you won't need to create or configure it by hand in GTM.

Troubleshooting

The event never fires.
Confirm the form is genuinely HubSpot-hosted - the postMessage this bridge listens for only comes from HubSpot's own embed script, not a lookalike form that submits elsewhere.

hubspot_form_guid comes through blank.
HubSpot's message payload shape has drifted slightly across embed script versions. Open the browser console, submit the form, and inspect the raw event.data object to see which field actually holds the form ID on your embed version.

The event fires, but values show up blank or undefined.
Check that the pushed object's key names match exactly (case-sensitive) - a mismatched key like "Value" instead of "value" will show as undefined in GTM's variable preview.

HubSpot Form Submission fires twice for the same action.
You likely also have a manually-added Google Ads snippet listening for the same action alongside this container's own bridge tag. Remove the manual one, or disable it, before publishing.

Frequently asked questions

What triggers the HubSpot Form Submission event?

It's detected automatically - HubSpot's own embed script (both the current hbspt.forms.create embed and the legacy iframe embed) broadcasts a window postMessage event - {type: 'hsFormCallback', eventName: 'onFormSubmitted'} - the moment a visitor successfully submits any HubSpot form on the page.. This container includes a ready-made bridge tag for it, so there's nothing to configure manually.

Why should I track HubSpot Form Submission with Google Ads specifically?

It shows engagement further up the funnel, which Google Ads can use to build audiences and understand what leads to a purchase, even before the sale happens.

Is this free to set up?

Yes - the free tier covers 1 tracking platform at a time. If you need this event across several platforms in one container, unlocking full access covers all of them together.

Will this conflict with Google Ads code I already added manually?

It can, if the same event fires twice from two separate sources. Remove any manually-added Google Ads tag for this event before importing the generated container, or use GTM's Preview mode to confirm it only fires once.

How long does setup take?

A few minutes - select Google Ads and the HubSpot Form Submission event in the wizard, enter your tracking ID, download the container, and import it into GTM.

Do I need to add any code to my site for HubSpot Form Submission?

No. Unlike most events in this wizard, this one ships its own small Custom HTML tag inside the container itself that detects the submission and pushes it to the dataLayer - there's no snippet to paste into your theme or a code snippets plugin.

Are there any conditions for this to actually work?

A HubSpot form embedded using HubSpot's standard embed code (hbspt.forms.create or the legacy iframe embed) - not a custom form that merely redirects to HubSpot.

← See all Google Ads events

Share with