Skip to main content

Adflix Consulting | Web Analytics & Data Tracking for Measurable Growth

Typeform Submissions Tracking with Google Tag Manager (Privacy-Compliant Setup)

If you’re collecting leads through Typeform, you can technically get a “submission” event into Google Tag Manager with a bit of custom code. That part isn’t the hard part.

 

The hard part is what happens after you send that data to Google Ads or Meta — and most people get this wrong in two ways: they either set it up in a way that creates real privacy compliance risk, or they feed their ad platform a signal that quietly makes their ad account worse over time.

 

Let’s walk through both problems, then the code.

 

Problem 01: A “Submission” Isn’t a Sale, But Your Ad Platform Doesn’t Know That

 

Here’s what actually happens when you track only the Typeform submission event and send it straight to Google Ads or Meta as your conversion:

 

Every person who fills the form counts as a win, even the ones who were never a real fit, ghosted your follow-up, or churned after a free trial. Your ad platform’s algorithm doesn’t know the difference. It just sees “conversion” and goes looking for more people who look like the ones who submitted the form, not more people who look like your actual customers.

 

Run this for a few months and you’ll usually see the same pattern: form-fill volume looks fine, but close rate quietly drops, cost per real customer climbs, and nobody can explain why the ads “stopped working”, because they never optimized toward a real customer in the first place.

 

The fix for this is Offline Conversion Tracking. Once a lead is later confirmed as a real, converted customer — a closed sale, a qualified deal, whatever “won” means for your business — that outcome gets matched back to the original lead and sent to Google Ads and Meta as an offline conversion. From that point on, your ad platform stops chasing “anyone who fills a form” and starts chasing “people who actually become customers.” That’s the difference between cost-per-lead quietly dropping while close rate falls, versus an ad account that gets more efficient the longer it runs.

 

Book a free 30-minute callClick here

 

If your leads are coming in fine but sales quality isn’t, this is usually the missing piece. I’ll walk through your funnel and map out exactly what an offline conversion setup would look like for your business.

 

Problem 2: Sending Raw Lead Data to Ad Platforms Is a Compliance Risk

 

The second mistake is what data actually gets sent. If your setup pushes raw form answers, unhashed emails and phone numbers, or personal details straight into a Custom HTML tag and out to a third-party ad platform, you’re likely handling personal data in a way that doesn’t hold up under GDPR, CCPA, or Google/Meta’s own advertiser data policies — regardless of where your business or your visitors are located.

 

This isn’t a hypothetical risk. Ad accounts get flagged, restricted, or have data connections cut off when platforms detect non-compliant data being passed through their pixels and conversion APIs. That’s a much more expensive problem than a slightly under-optimized campaign.

 

The fix for this is Server-Side Tracking. Instead of firing pixels directly from the browser — where they’re exposed to ad blockers, iOS restrictions, and raw personal data floating through client-side code — your data routes through a server you control first. Personal details get hashed properly before anything reaches Google or Meta, and you stop losing conversions to browser-level blocking. This is a separate fix from lead quality — it’s about the accuracy and safety of the data itself, regardless of whether a lead converts later or not.

 

Book a free 30-minute call Click here

 

If you suspect you’re losing conversions to tracking prevention, or you’re not confident your current setup is compliant, this is the one to start with. I’ll audit your current tracking and show you exactly what’s leaking or exposed.

 

The Event Listener Code (Free to Use)

 

This part you can absolutely implement yourself. It captures Typeform’s submission event — which normally can’t be tracked with GTM’s default form listener, since Typeform loads in an iframe on its own domain — and pushes it cleanly into your dataLayer.

html
html

<script>
(function () {
  window.addEventListener("message", function (event) {
    // Security check: only accept messages coming from Typeform's own domain
    if (!event.origin || event.origin.indexOf("typeform.com") === -1) return;

    var payload = event.data;
    if (!payload || !payload.type) return;

    window.dataLayer = window.dataLayer || [];

    if (payload.type === "form-submit") {
      window.dataLayer.push({
        event: "typeform_submission",
        typeform_id: payload.formId
      });
    }

    if (payload.type === "form-screen-changed") {
      window.dataLayer.push({
        event: "typeform_step_change",
        typeform_id: payload.formId,
        typeform_step_ref: payload.ref
      });
    }
  }, false);
})();
</script>

Add this as a Custom HTML tag in GTM, firing on the page(s) where your Typeform is embedded. Once it’s in, typeform_submission becomes a usable trigger for any tag — GA4, Google Ads, Meta, or otherwise.

Where to Go From Here

 

This snippet gets you a clean, working submission signal — that part’s free and yours to use. Whether the bigger issue for your business is data getting lost or exposed (server-side tracking) or leads coming in but not converting to real sales (offline conversion tracking), both are worth fixing properly rather than patching client-side code repeatedly. Book a call above for whichever one matches what you’re actually seeing.

Leave a Reply

Your email address will not be published. Required fields are marked *