Forms & Meetings · Iframe Listener

Typeform integration

Attribute Typeform submissions to the campaign that brought the visitor, with hidden fields and a webhook.

No credit card required · one script tag

Attribute submissions from embedded Typeform forms to the ad, search query or social post that brought the visitor.

A Typeform embed submits inside Typeform’s own frame, which the page tracker’s browser submit listener cannot see. The webhook is the dependable route.

How a Typeform submission is recorded

  • Webhook: Typeform posts each response to your SourceTrack source URL with /form/typeform added. SourceTrack reads the hidden fields st_aid, utm_source, utm_medium, utm_campaign and the email answer. Without st_aid, a submission is matched to a visitor by email only when SourceTrack already knows that email. Otherwise it is recorded as a lead with no source.
  • Completion message: The tracker can also listen for Typeform’s own form-submit message and read only the form id, never answers or email. A server switch governs it and it is still being rolled out, so do not rely on it alone.
  • Hidden fields: When your form declares hidden fields named exactly st_aid, utm_source, utm_medium and utm_campaign (names are case-sensitive), the standard tracker adds the visitor id and UTM values to the embed. It skips this when the visitor sends Do Not Track or Global Privacy Control, and the Cookieless Mode build never hands the id to a third party. Values containing an @ are never sent.
  • Ad click ids (gclid, fbclid) are not read from Typeform submissions.

Step-by-step setup

Step 1: Install SourceTrack

Add the tracking snippet to the page that holds your form.

Step 2: Declare hidden fields in Typeform

In the Typeform builder, add hidden fields named st_aid, and optionally utm_source, utm_medium and utm_campaign.

Step 3: Embed the form

Embed the Typeform with its standard snippet.

Step 4: Add the webhook

In SourceTrack, open Integrations, then Webhook sources, and use the steps under “Form hosted on another site?”. Copy the source URL, add /form/typeform to the end, and add it as a webhook in Typeform.

Step 5: Test a submission

Open your page in a new private window with UTM tags on the link, submit the form, and find the lead in SourceTrack.

What you will see in SourceTrack

A Typeform response that arrives with st_aid is linked to that visitor’s journey. You see it as a lead with the source, medium and campaign that brought the visitor, and the pages they viewed before submitting, in time order. A response that arrives without st_aid is matched by email only when SourceTrack already knows that email from an earlier form on your site. Otherwise it is recorded as a lead with no source, which you will see as an unattributed lead.

How it works under the hood

There are two separate pieces, and they do different jobs.

  1. The hand-off in the browser. The standard tracker looks for Typeform embeds on your page and adds the visitor id as st_aid, and the UTM values under their own names, as parameters that Typeform turns into hidden fields. For Typeform it writes the values onto the embed element’s hidden attribute when the tracker runs first, or onto the iframe address of a Typeform form that was added later. If an embed already has its own value for a name, SourceTrack does not overwrite it.
  2. The webhook on the server. SourceTrack reads only the four hidden fields and the email answer, which is used to match a returning visitor. No other answer is read.

A Typeform embed submits inside Typeform’s own frame, which the tracker’s submit listener cannot see, so the webhook is the dependable route. Typeform can also send a form-submit message that the tracker may read for the form id only, never the answers or the email. That route is switched by a server setting and is still being rolled out.

Test it end to end

  1. Declare the four hidden fields in Typeform: st_aid, utm_source, utm_medium and utm_campaign, exactly as written.
  2. Add the webhook in Typeform with your SourceTrack source URL plus /form/typeform.
  3. Open a new private window with no Do Not Track or Global Privacy Control signal and visit the page through a link with UTM tags.
  4. In SourceTrack, find the lead and open its journey. Check that the source and the pages before the submission are there.

Common problems and fixes

  • Hidden fields are empty in the response. The field must be declared in Typeform under the exact name. Names are case-sensitive: st_aid, not St_Aid or st-aid. Typeform stores a value only for a field you created.
  • The form was already loaded. A Typeform iframe that is already loaded when the tracker runs is left alone, because changing its address would reload a form in use. Load the SourceTrack snippet before the embed script.
  • Do Not Track, Global Privacy Control or missing consent. The tracker adds nothing, so the response has no visitor id. Test in a clean window.

Frequently Asked Questions

Does this work if Typeform is embedded inside an iframe?

Yes, through the webhook. The tracker cannot see inside the frame with its submit listener. Detection by the tracker alone, from Typeform’s completion message, is still being rolled out.

Will submissions trigger conversions on ad platforms?

This page makes no promise about that. SourceTrack records the lead and its source; click ids are not read from Typeform submissions.

What does SourceTrack read from a Typeform response?

Only the hidden fields st_aid, utm_source, utm_medium, utm_campaign and the email answer. Other answers are not read.