Skip to content

Google AdsPublished 15 min read

Typeform Conversion Tracking for Google Ads (GTM)

How to count embedded Typeform submissions as Google Ads conversions with GTM, keep the gclid attached to each lead, and stop Meta and Google from double counting.

Muhammad Qitmeer, founder of Augere Labs
Muhammad Qitmeer
Co-founder and CEO, Augere Labs
Share

Typeform conversion tracking for Google Ads works best when the page that hosts the embed listens for Typeform's form-submit message, pushes a dataLayer event, and fires your Google Ads conversion tag from Google Tag Manager on that event. Then pass the gclid and UTMs into the form as hidden fields so every response carries its ad click. A plain "thank you page" or Typeform's own GTM integration alone will usually undercount or misattribute.

This is for agency PPC managers and developers who inherit a client site with an embedded Typeform and a Google Ads account that shows zero conversions, or twice as many as the CRM. It covers why Typeform is harder than a normal form, the four tracking methods and when each fits, a tested GTM listener, the hidden field setup for click IDs, what enhanced conversions can and cannot do with an iframe, and how to keep Meta and Google from counting the same lead twice.

Why doesn't Google Ads see Typeform submissions?

Google Ads doesn't see Typeform submissions because the form runs inside an iframe served from Typeform's domain, so your site's tags never see the submit happen.

When you embed a Typeform, the questions, the submit button and the ending screen all live on form.typeform.com, inside a frame on the client's page. The Google tag on the parent page has no access to anything inside that frame. GTM's built-in Form Submission trigger listens for the browser's submit event on the parent document, and that event never fires there. A Click trigger on the button does not work either, because the click also happens inside the frame.

Audits usually turn up one of three results:

  • Zero conversions. A GTM Form Submission trigger was assumed to cover the Typeform.
  • Inflated conversions. The conversion fires on a URL people can reach without submitting, or two methods are live at once.
  • Conversions with no ad click. The form opens as a full page on Typeform's domain and the click ID never reaches the conversion. Leads show up in the CRM as direct traffic.

The fix is to get a reliable signal out of the iframe and onto the parent page, where your tags and the Google Ads cookies already live. The general pattern is the same as other iframe forms, covered in our Google Tag Manager form tracking guide. Typeform just happens to give you a clean signal for it.

What is the best way to track Typeform conversions in Google Ads?

For an embedded Typeform, the best way is a GTM Custom HTML listener for the embed's form-submit message, with the Google Ads conversion tag firing on the dataLayer event it pushes.

Typeform's embed SDK talks to the parent page with window.postMessage. When a respondent submits, the iframe sends a message whose type is form-submit, along with the form ID and the response ID. The official SDK uses those same messages to run its onSubmit callback, which Typeform documents as firing right after a successful submission, and not for validation errors or dropped connections. You can read the full list of callbacks in Typeform's embed callbacks documentation.

Here is how the realistic options compare:

MethodWhere it runsAccuracyUse it when
GTM listener for the form-submit messageParent page, your GTM containerHigh, fires once per real submissionThe form is embedded with Typeform's embed code. This is the default.
SDK onSubmit callbackParent page, your own JSHighA developer controls the embed code and wants the push in the site code instead of GTM.
Redirect on completion to a thank you pageParent page after navigationMedium, page can be reached without submittingNo developer access and the form opens full page, or as a fallback.
Typeform's native GTM integrationInside the Typeform pageLow for Google Ads attribution on embedsThe form is shared as a standalone link and you only need analytics.
Webhook plus offline conversion importServerHighest, and can wait for lead qualityLeads are qualified later in a CRM, or browser tracking is blocked often.

Most client sites end up with two layers: the GTM listener for a fast, same-session conversion, and the gclid stored in a hidden field so the CRM can import qualified leads later. More on both below.

How do I set up a GTM listener for Typeform form submits?

Add a Custom HTML tag that listens for messages from Typeform's origin, filters for form-submit, and pushes a named event to the dataLayer, then trigger the Google Ads conversion tag on that event.

  1. Check how the form is embedded. View the page source or the Elements panel. You want Typeform's embed code: a div with a data-tf-widget, data-tf-popup or similar attribute, plus the script from embed.typeform.com. If someone pasted a raw iframe or a link, swap it for the official embed code first, because the listener depends on the messages the embed setup sends.
  2. Create the listener tag. In GTM, add a Custom HTML tag with the code below. Fire it on the pages that contain the form, or on All Pages if the form appears in a site wide popup.
  3. Create a Custom Event trigger. Event name typeform_submit. Add a condition on the form ID variable if the site has more than one Typeform and only some of them are conversions.
  4. Create the variables. Two Data Layer Variables: typeform_form_id and typeform_response_id.
  5. Add the Google Ads conversion tag. Use the conversion ID and label from the client's Google Ads conversion action. Put the response ID variable in the Transaction ID field so Google Ads can drop duplicates of the same submission.
  6. Test in Preview mode. Submit a real test response. In Tag Assistant you should see one typeform_submit event, with a form ID and a response ID, and one conversion tag fired on it.
  7. Publish, then watch the conversion action. The status in Google Ads can take a while to update after the first recorded conversion, so check it again the next day.

The listener:

<script>
  (function () {
    // Add your client's custom Typeform domain here if they use one.
    var allowedOrigins = ["https://form.typeform.com"];
  
    window.addEventListener("message", function (e) {
      if (allowedOrigins.indexOf(e.origin) === -1) return;
      var d = e.data;
      if (!d || typeof d !== "object" || d.type !== "form-submit") return;
  
      window.dataLayer = window.dataLayer || [];
      window.dataLayer.push({
        event: "typeform_submit",
        typeform_form_id: d.formId || "",
        typeform_response_id: d.responseId || ""
      });
    });
  })();
  </script>

A few details that matter on real client sites:

  • Check the origin. Any page or frame can send a message to the window. Without the origin check, a chat widget or ad iframe that happens to send an object with type: "form-submit" would fire a conversion. If the form loads from a different host, confirm it in the Network panel and add that origin.
  • Use a unique event name. Do not push a generic form_submit. Many themes, plugins and GA4 setups already push that name, and a shared trigger will start firing on everything.
  • Load the listener before the form is submitted. If consent tools delay GTM until a banner is accepted, a fast respondent who never clicks the banner may finish before the listener exists. Under Consent Mode the Ads tag can still send cookieless pings once it loads, so make sure GTM itself loads before consent. Our Consent Mode v2 implementation guide covers that setup.
  • Popups and sliders work the same way. createPopup, createSlider and the other embed types all use the same messages, so one listener covers every Typeform on the site.

Using the onSubmit callback instead

If a developer owns the embed code, the onSubmit callback does the same job without a listener. In the HTML embed, callbacks take the name of a global function. In the JavaScript SDK, you pass a function that receives formId and responseId:

<div data-tf-widget="FORM_ID" data-tf-on-submit="tfSubmitted"></div>
  <script src="//embed.typeform.com/next/embed.js"></script>
  <script>
  function tfSubmitted(payload) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({
      event: "typeform_submit",
      typeform_form_id: payload.formId,
      typeform_response_id: payload.responseId
    });
  }
  </script>

Pick one method. If both the callback and the GTM listener push typeform_submit, every lead counts twice. If Google Ads already shows double the CRM's lead count, start with our fix for Google Ads counting conversions twice.

One more callback worth knowing: onEndingButtonClick. Typeform notes that adding it disables the redirect on the ending screen button. Don't add it to a form whose tracking depends on that redirect.

How do I pass the gclid and UTMs into Typeform hidden fields?

Create hidden fields in the form with the same names as the URL parameters, then list those parameters in the embed's data-tf-transitive-search-params attribute so Typeform copies them from the page URL into the response.

The conversion tag on the parent page handles same-session attribution. The hidden fields are what let you tie a specific response back to a specific ad click weeks later, which you need for offline imports, lead scoring and CRM source reports.

  1. Add hidden fields to the form. In the Typeform builder, add hidden fields named exactly gclid, gbraid, wbraid, utm_source, utm_medium, utm_campaign, utm_term and utm_content. Names must match the query parameters.
  2. Forward them from the page URL. On the embed, add the attribute below. Parameters not in the list are ignored.
  3. Handle visitors who browse first. Transitive search params only read the current page URL. If the ad lands on the homepage and the form is on /quote, the gclid is gone from the URL by the time the visitor reaches the form. Store the click ID in a first-party cookie on landing and pass it through data-tf-hidden instead (example below).
  4. Test with a fake click ID. Load the form page with ?gclid=test123&utm_source=google, submit, and check the response in Typeform's results. The hidden field columns should hold the values.
<div data-tf-widget="FORM_ID"
    data-tf-transitive-search-params="gclid,gbraid,wbraid,utm_source,utm_medium,utm_campaign,utm_term,utm_content">
  </div>

For the stored cookie case, build the embed with the JavaScript SDK and pass values through the hidden option. Read the cookie with whatever helper the site already uses. String concatenation keeps this safe for any templating system:

<div id="tf-quote"></div>
  <script src="//embed.typeform.com/next/embed.js"></script>
  <script>
  function readCookie(name) {
    var m = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
    return m ? decodeURIComponent(m[1]) : "";
  }
  window.tf.createWidget("FORM_ID", {
    container: document.getElementById("tf-quote"),
    hidden: {
      gclid: readCookie("agency_gclid"),
      utm_source: readCookie("agency_utm_source"),
      utm_campaign: readCookie("agency_utm_campaign")
    }
  });
  </script>

The cookie names here are placeholders for whatever your landing page script sets. Keep UTM values consistent across clients, or the CRM reports turn into a mess of near duplicates. Our UTM naming convention for agencies has a template.

On iOS traffic you will often see gbraid or wbraid instead of a gclid. Capture all three. They have their own rules when you import them, covered in our gbraid and wbraid import guide.

Does Typeform's native Google Tag Manager or GA4 integration track Google Ads conversions?

Not reliably for embedded forms, because Typeform's native integrations run your tags inside the Typeform page, not on the client's site where the Google Ads click cookies live.

Typeform offers built-in connections for Google Tag Manager, Google Analytics 4 and the Facebook (Meta) Pixel in the form's Connect panel. At the time of writing, Typeform's help center lists the GTM and GA4 integrations as requiring a Business plan, and Typeform has been testing how features are packaged, so check the client's own account before you promise anything. A few points to weigh:

  • The container runs on Typeform's domain. When the form is embedded, your GTM container loads inside a third-party iframe. Browsers partition or block cookies in that context, so a Google Ads tag there usually cannot read the conversion linker cookie set on the client's domain. Conversions either fail to attribute or attribute poorly.
  • Some events are not exposed to GTM. Typeform's help center states that its TypeformFirstInteraction and TypeformSubmit events are tracked through the native Facebook Pixel integration, not through the GTM integration.
  • Payment fields block GTM. Typeform's GTM article says the GTM integration cannot be used on a form that has a Payment field.
  • Standalone links are different. If the ad sends people straight to a typeform.com URL with no client page in between, the native integration is the only place tags can run. In that case it is better than nothing, but you still lose the client site's cookies, and you should put the click ID in hidden fields and import conversions offline.

The practical rule for agencies: use the native GA4 integration if the client wants per-question analytics in GA4, and use the parent page listener for anything that feeds bidding. If GA4 also needs a lead event from the same submit, push it from the same typeform_submit dataLayer event and follow a single naming plan, as described in our GA4 key events and naming plan.

When the redirect method makes sense

Typeform can send respondents to a URL on completion, either for the whole form or per ending, and the redirect URL can include hidden field values as query parameters. With the embed, the redirectTarget option (data-tf-redirect-target) controls which window navigates. It defaults to _parent, so the client's page itself moves to the thank you URL, and a normal page view trigger can fire there.

This works, but it has the usual thank you page problems. People bookmark it, reload it and share it, and search engines can find it. If you use it:

  • Add a marker parameter. Redirect to something like /thanks?src=typeform and only fire the conversion when that parameter is present.
  • Noindex the page. Keep it out of search results.
  • Never run it alongside the listener. The redirect happens right after the submit, so both methods would fire for the same lead.
  • Don't put personal data in the URL. Recalling an email address into a redirect link puts it in server logs, analytics and referrer headers. Google's policies also prohibit sending personal data to Google in URLs.

Can I use enhanced conversions with an embedded Typeform?

Not through the usual browser setup, because the email and phone fields are inside Typeform's iframe and the Google tag on the parent page cannot read them.

Enhanced conversions on the web work by having the Google tag collect the email or phone from the page at conversion time, hash it and send it with the conversion. GTM's automatic collection looks for form fields in the page DOM, and CSS selector or JavaScript variable methods also read from the parent document. None of them can reach into a cross-origin iframe, and the form-submit message carries IDs, not answers. So for a Typeform conversion, browser-side enhanced conversions will usually report no user data.

There are two workable routes:

  • Server side with the webhook. Typeform webhooks send the full response, including the answers and a hidden object with your hidden field values, to a URL you control. From there you can upload the conversion to Google Ads with the gclid and the hashed email. Google describes this lead flow in About enhanced conversions for leads. Our offline conversion import guide walks through the upload side, and the enhanced conversions setup guide covers the account settings.
  • Ask for the email on the parent page. Some clients put a short email step on their own page and open the Typeform after it. That gives the Google tag a real field to read. It changes the funnel, so only suggest it if the client is open to that.

Do not try to pass the email back out of the iframe through a redirect URL or a hidden query string just to feed the tag. It leaks personal data into places it should not be, as noted above.

Matching browser and server records

The webhook payload contains a form_response.token. Typeform treats this as the response's unique ID, the same value the Responses API returns as the response ID, and the embed's onSubmit payload exposes a responseId. Submit a test response and confirm the two values match in your setup before you build on it. When they do, you have one ID that follows the lead from the browser to the server, which is exactly what deduplication needs.

How do I stop Meta Pixel and Google Ads from double counting Typeform leads?

Choose one source per platform for each lead, and when you send the same lead from both the browser and the server, give both copies the same event name and the Typeform response ID as the event ID.

Typeform's native Meta Pixel integration sends custom events named TypeformFirstInteraction and TypeformSubmit. Those are custom events, not the standard Lead event. Problems start when an agency adds a Lead event from GTM on top, and the client's ad account ends up with two conversions per submission under different names. Meta does not deduplicate those against each other, because they are different events.

SetupWhat happensFix
Native Typeform pixel plus a GTM Lead eventTwo different events per submission. Custom conversions built on both double count.Pick one. For embeds, prefer the GTM Lead on the parent page.
GTM Lead plus Conversions API Lead with no shared IDMeta cannot tell they are the same lead.Send the response ID as eventID in the pixel and event_id in CAPI.
GTM listener plus onSubmit callback both pushingTwo dataLayer events, two conversions in every platform.Remove one of them.
Listener plus thank you page triggerGoogle Ads and Meta count each lead twice.Keep the listener, remove the page view conversion.

Meta matches duplicates on event name plus event ID, within 48 hours of the first event with that ID, as described in Meta's guide to handling duplicate pixel and Conversions API events. In GTM, use the typeform_response_id variable as the event ID on the Meta pixel tag. On the server, read the webhook token and send it as event_id with the same event name. Our Meta Conversions API deduplication guide covers testing it in Events Manager.

For Google Ads, the same response ID goes in the conversion tag's Transaction ID field. If you also upload the lead later from the CRM as a different conversion action, such as a qualified lead, that is not a duplicate. It is a separate stage, and only one of those actions should be set as primary for bidding.

A checklist for auditing a client's Typeform tracking

Run through this on any account where Typeform is the main lead form:

  1. Find every Typeform on the site. Inline embeds, popups, sliders, and buttons that link to a full page form. Each one needs a decision.
  2. List every tag that claims to track it. GTM listeners, onSubmit code in the theme, thank you page triggers, the native pixel, native GTM, native GA4, Zapier zaps. More than one per platform is a red flag.
  3. Submit one test response with a fake gclid. Count how many Google Ads conversion hits fire in Tag Assistant, and how many Meta events show in the Test Events tool. The answer should be one each.
  4. Check the response in Typeform. The hidden fields should hold the test gclid and UTMs.
  5. Compare a week of data. Typeform response count against Google Ads conversions and CRM leads from paid search. Small gaps are normal. A 2x gap or a near zero count means a method is doubled or broken.

Getting it fixed for a client

Typeform tracking breaks in quiet ways. The form still collects leads, so nobody notices that Google Ads is bidding on half the real conversions, or twice as many. If you want a second pair of eyes before you rebuild it, we will check the embed, the tags and the hidden fields on one client site and tell you exactly what is firing and what is missing. Start with a free tracking check.

Just one quick fix, not a whole account? Our founder takes small fixed-price jobs on Fiverr: Google Ads conversion tracking fix

Frequently asked questions

What is the Typeform postMessage event name for a submission?

Typeform's embed sends a message with type form-submit when a response is submitted, along with the form ID and response ID. Listen for it on the parent page and check that the message origin is Typeform's domain.

Can GTM's Form Submission trigger track an embedded Typeform?

No. The form runs in a cross-origin iframe, so the browser submit event GTM listens for never fires on your page. Use a Custom HTML listener for the form-submit message or the SDK's onSubmit callback instead.

Does Typeform pass the gclid automatically?

No. Create a hidden field named gclid in the form and list gclid in the embed's transitive search params, or pass a stored value through the hidden option if visitors land on a different page first.

Why does Google Ads show twice as many Typeform conversions as real leads?

Usually two methods are live at once, such as a GTM listener plus a thank you page trigger or the onSubmit callback. Keep one, and put the Typeform response ID in the conversion tag's Transaction ID field.

Which Typeform plan includes the Google Tag Manager integration?

Typeform's help center lists the GTM and GA4 integrations under the Business plan at the time of writing, but Typeform has been testing feature access, so check the account. The parent page GTM listener does not depend on that integration.

Muhammad Qitmeer

Written by

Muhammad Qitmeer, founder of Augere Labs

Augere Labs is the white-label tracking partner behind marketing agencies. If a client account has numbers you don't trust, I'm happy to look at it with you and tell you straight what's wrong.

Connect on LinkedIn