Free tool by MD Niamul

Free Form Tracking Listener Generator GTM Event Listener Code for HubSpot, GoHighLevel, Iframe and Native Forms

One Custom HTML Tag That Turns a Form Submit into a Clean dataLayer Event

26 form platforms and patterns
Hashed user data and click IDs
GTM setup and test steps

Pick your form platform and this free tool writes a form tracking event listener for Google Tag Manager. It covers HubSpot form tracking in GTM, GoHighLevel form tracking, iframe form tracking in GTM, WordPress form plugins and plain HTML forms. The code catches the submission, adds UTM parameters, ad click IDs and SHA-256 hashed email and phone, and pushes one dataLayer event your GA4, Google Ads and Meta tags can use.

26Form platforms and patterns
5Outputs: code, example, setup, test, notes
850+Projects delivered
600+Five-star reviews
MD Niamul, creator of the free form tracking listener generator
upworkTop Rated Plus
GTM Form ListenerFree Code Generator
OfficialStape Partner

Forms the Listener Generator Covers

HubSpot Forms
GoHighLevel Forms
GoHighLevel Calendar
Calendly
Typeform
Jotform
Tally
Elementor Pro
WPForms
Gravity Forms
Contact Form 7
Webflow Forms
Klaviyo Forms
Marketo
Iframe postMessage
AJAX Forms
Thank-You Page
SHA-256 Hashing
FREE FORM LISTENER GENERATOR

Generate Your Form Tracking Listener

Choose the platform, set the options and copy the code. It updates as you click.

Form Tracking Listener GeneratorHubSpot · GoHighLevel · Calendly · WordPress forms · Iframe · AJAX · Native forms
Free · No login

1. Choose your form platform

Confirmed from docsKnown pattern, test before useBrowser standard

Not sure which one you have? Detect it for me

2. Event names and platform settings

3. What to include in the event

4. Consent and privacy

5. Only track some forms optional

The ID filter works for platforms that report a form ID. The selector works for forms that sit in your own page, not inside an iframe.

Your listener code

The code is built in your browser. If you scan a page, its address is sent to our server, which loads the page once to read its public code. We keep a simple log of the page address scanned, the platforms and event names chosen and the options. Embed code you paste is not sent or logged.

One GTM Custom HTML tagCopy, or download .html, .js and ExcelConfidence shown for every platform
WHAT IT BUILDS

What Does the Form Listener Generator Give You?

One tag for Google Tag Manager, plus everything you need to set it up and test it.

The GTM Custom HTML Tag

A platform listener plus one shared enrichment engine, in plain ES5 JavaScript that Google Tag Manager accepts.

Several Platforms in One Tag

Select HubSpot, Calendly and a native form together. They share one engine and each keeps its own event name.

UTMs and Click IDs

Six UTM parameters and 17 ad click IDs, kept from the landing page until the form is sent.

Hashed User Data

SHA-256 hashed email, phone and name for Enhanced Conversions and the Conversions API, hashed in the visitor’s browser.

Consent Gating

Hashed data, click IDs and cookies stay empty until Google Consent Mode, a variable or a cookie says consent was given.

Iframe Sender Snippet

For forms on another domain: a snippet for inside the iframe and a parent listener, with an origin check on both sides.

GTM Setup Steps

The tag trigger, the Custom Event trigger, each Data Layer Variable and how to map them into GA4, Google Ads and Meta.

Test Steps and Notes

GTM Preview steps, a console snippet to see raw iframe messages, and the known limits of each platform.

How Does the Form Listener Generator Work?

Three steps. The code is written in your browser.

01

Pick the platform

Choose it from the list, or let the tool detect it from a page address or from pasted embed code.

02

Set the options

Name the event, choose what to include and decide how consent is read.

03

Paste, then test

Add the code to one Custom HTML tag, create the trigger and variables, and test in GTM Preview with a real submission.

What Is a Form Tracking Event Listener?

A form tracking event listener is a small script that waits for a form to be submitted and then tells Google Tag Manager about it. It does that by pushing an event into the dataLayer. Your GA4, Google Ads and Meta tags fire on that event.

You need one because many forms give GTM nothing to work with. An embedded HubSpot or GoHighLevel form does not reload the page. A Calendly widget sits in an iframe from another website. A WordPress form shows a success message without changing the address. GTM’s built-in Form Submission trigger misses most of these.

How do different forms announce a submission?

  • A message from an iframe. GoHighLevel, Calendly, Typeform, Jotform and Tally sit in an iframe and send a postMessage to your page. The listener reads that message.
  • The platform’s own event. HubSpot, Klaviyo, Marketo, Contact Form 7, WPForms, Gravity Forms and Formidable Forms fire a documented event when the form succeeds.
  • A success message. Webflow, Mailchimp and many custom AJAX forms only show a message. The listener watches for it to appear.
  • A new page. Some forms reload or send the visitor to a thank-you page. The listener prepares the values at submit time and pushes the event on the next page.

What does the generated code add to the event?

The code has two parts. The listener is specific to your platform. The enrichment engine is the same for every platform. It collects UTM parameters, ad click IDs such as gclid and fbclid, marketing cookies and device details, hashes the email, phone and name with SHA-256, and pushes one event with everything under inputs. This is the same structure I use for client work.

Why is hashing done in the browser?

Google’s Enhanced Conversions and Meta’s Conversions API match conversions using hashed contact details. Hashing in the browser means the readable email does not have to sit in the dataLayer, where every other script on the page can read it. Plain values are off by default for that reason.

What this tool cannot check

The code follows each platform’s published or commonly observed events. Platforms change them, sometimes without notice, so every platform is labelled “Confirmed from docs” or “Known pattern, test before use”. The tool cannot submit your form or see your live page, so you must test in GTM Preview on the real form before you publish.

It cannot see inside a cross-domain iframe unless the form platform sends a message or you can add code inside the iframe. Calendly, Typeform and Jotform do not send the visitor’s email in their message, so those events carry no hashed user data. The page scan reads the page source our server receives, so a form added by JavaScript after the page loads can be missed.

The code does not send data anywhere by itself. It only pushes an event to the dataLayer. Your GTM tags decide what goes to Google, Meta or anyone else, and you remain responsible for consent and for what your privacy notice says.

Form Platforms and How Each One Is Tracked

The signal the listener waits for, and whether it can read the contact details.

PlatformSignal the listener usesContact detailsConfidence
HubSpot formshsFormCallback message (legacy) and hs-form-event (new editor)YesConfirmed from docs
GoHighLevel / LeadConnectorArray message from the embed iframeYesKnown pattern
Calendlycalendly.event_scheduled messageNoConfirmed from docs
Typeformform-submit message from the embedNo, IDs onlyKnown pattern
Jotformsubmission-completed messageNo, form ID onlyKnown pattern
TallyTally.FormSubmitted messageYesConfirmed from docs
Elementor Prosubmit_success jQuery eventYesKnown pattern
WPFormswpformsAjaxSubmitSuccess jQuery eventYesConfirmed from docs
Gravity Formsgform_confirmation_loaded jQuery eventYesConfirmed from docs
Contact Form 7wpcf7mailsent DOM eventYesConfirmed from docs
KlaviyoklaviyoForms window eventEmail and phoneConfirmed from docs
MarketoMktoForms2 onSuccessYesConfirmed from docs
Webflow, Mailchimp, ActiveCampaignSuccess message becomes visibleYesKnown pattern
Native HTML formBrowser submit eventYesBrowser standard
Cross-domain iframepostMessage from the sender snippet you addYes, with the snippetBrowser standard

Who Is This Generator For?

Tracking specialists

Skip the boilerplate and start from a listener that already handles hashing, attribution and duplicates.

Marketing agencies

Use one consistent event structure across every client’s form platform.

Business owners

Give your developer or freelancer exact code and setup steps instead of a vague request.

GoHighLevel and HubSpot users

Finally see embedded form and calendar leads as conversions in GA4, Google Ads and Meta.

MORE FREE TOOLS

More Free Marketing Tools by MD Niamul

33 free tools for tracking, analytics, advertising and SEO. No login needed.

Free SHA-256 Hashing Code Generator

Turn your email, phone and address variables into correctly formatted, hashed values for each ad platform.

Open the hashing generator →

Free Meta CAPI Payload Builder

Build and validate a Conversions API event with hashed user data and a matching pixel call.

Open the CAPI builder →

Free GA4 Event Checker

Validate GA4 event names and parameters against Google’s rules before you publish.

Open the GA4 event checker →

Free UTM & Click ID Redirect Checker

Test whether redirects strip gclid, fbclid and UTM parameters before visitors reach your page.

Open the redirect checker →

Trusted by 600+ Brands & Agencies

MYLENE
HOVER BOARDS
GT SOLI
CAMBRIDGE
BIENEN CORB 24
ZULU SHACK CREATIVE
ADPSY LLC
HIGH PERFORMANCE MEDIA
ADS PERFORMANCE
LEGESI
TESTIMONIAL

Analytics & Conversion Tracking Client Testimonials

Hear from our clients. Loved by 600+ businesses worldwide.

Madison Jonas, client of MD Niamul
Madison JonasGoogle Ads clientLinkedIn recommendation
★★★★★

“I had an excellent experience working with MD on my Google Ads account. Everything was set up perfectly and worked smoothly without any issues or troubleshooting needed. His expertise and attention to detail made the whole process effortless.”

Mehboob Khan, client of MD Niamul
Mehboob KhanGoogle Analytics projectsLinkedIn recommendation
★★★★★

“I worked with Niamul on multiple Google Analytics projects and was impressed by his expertise and precision. He has a strong grasp of tracking, reporting, and optimization, always ensuring accurate insights. He is proactive, reliable, and easy to collaborate with.”

Jacco Bouw, client of MD Niamul
Jacco BouwShopify, GA4 & Google Ads trackingLinkedIn recommendation
★★★★★

“MD Niamul is extremely skilled. He fixed my Shopify, Google Analytics, and Google Ads conversion tracking perfectly. Everything works exactly as it should now, and he even added an extra data layer, which was very helpful. Outstanding service, fast delivery, and highly recommended.”

Ryan S Kemp, client of MD Niamul
Ryan S KempCMO, Co-Founder, Zulu Shack CreativeLinkedIn recommendation
★★★★★

“Reliable, knowledgeable, and truly trustworthy. I’ve been working with Niamul for over a year, and he consistently delivers exceptional results across all analytics tasks. His expertise, communication, and commitment make him my go-to specialist for tracking, measurement, and data accuracy.”

Casper Klein, client of MD Niamul
Casper KleinMeta Pixel & server-side trackingLinkedIn recommendation
★★★★★

“MD N delivered flawless Meta Pixel, CAPI, and server-side tracking. He understood our goals quickly, explained everything clearly, and ensured full transparency. Communication was smooth, updates were consistent, and the results improved our data accuracy and ad performance.”

600+

Five-star reviews from businesses and agencies in the USA, Canada, UK and Australia.

Read All Reviews

Video Testimonials: Hear It From Our Clients

FAQ

Frequently Asked Questions About the Free Form Tracking Listener Generator

Is the form tracking listener generator free?

Yes. It is free with no login. The code is written in your browser and you can copy it or download it.

How do I track a HubSpot form in Google Tag Manager?

Choose HubSpot forms, copy the code into a Custom HTML tag that fires on all pages, and create a Custom Event trigger for hubspot_form_submit. The listener covers legacy embedded forms, which send an hsFormCallback message, and forms built in the new editor, which fire hs-form-event events.

How do I track a GoHighLevel form or calendar that is embedded on my site?

The embedded form sends a message to your page when it is submitted. Choose GoHighLevel form, calendar or both. The listener reads that message and pushes ghl_form_submit or ghl_booking_complete. GoHighLevel does not publish this message, so test it in GTM Preview.

Can Google Tag Manager track a form inside an iframe?

Only when the iframe sends a message to your page. Many form tools do. If yours does not, you need to add the sender snippet to the page inside the iframe. If you cannot add code there, use a thank-you page on your own site or the platform’s webhook.

Why is there no email in my Calendly event?

Calendly’s message to your page contains links to the event and the invitee, not the name or email. To get those, use Calendly’s webhook or API on a server, or redirect to your own thank-you page.

Is it safe to put email addresses in the dataLayer?

It is better not to. Anything in the dataLayer can be read by every script on the page. That is why this tool hashes the email and phone and keeps plain values switched off unless you turn them on.

Does the code send data to Google or Meta?

No. It only pushes an event into the dataLayer on your own page. Your GTM tags decide what is sent and to whom. The one exception is the optional IP geolocation lookup, which calls third-party services and is off by default.

Will it count the same lead twice?

The listener ignores a repeat of the same event for the same form within three seconds and refuses to load twice on one page. You should still remove any older form listener tags and check for duplicates in GTM Preview.

What does “Known pattern, test before use” mean?

It means the platform does not document the signal the listener relies on. The pattern is widely used and works today, but the platform can change it. Platforms marked “Confirmed from docs” follow the platform’s own developer documentation.

Want Your Forms Tracked and Tested for You?

I am MD Niamul, a conversion tracking and web analytics specialist and an official Stape partner. I build form listeners like this one for agencies and brands, connect them to GA4, Google Ads Enhanced Conversions and Meta Conversions API through server-side GTM, and test every form with real submissions.