Form Setup
Set up SourceTag with Typeform
Typeform handles hidden fields differently from WordPress form builders. You create them in Typeform’s settings, and they get populated via the embed URL or by SourceTag’s script when embedded on your site.
What you need
- SourceTag installed on your website (not on Typeform itself)
- A Typeform form embedded on your site
Step 1: Open your Typeform
Go to your Typeform and click Create or open an existing form.
Step 2: Add hidden fields
- Click the Logic tab (or Settings depending on your Typeform version)
- Find Hidden Fields
- Click Add hidden field
- Enter the field name exactly as it appears in SourceTag
Core fields (add these)
Add each of these as a separate hidden field:
st_fc_channelst_fc_detail_1st_fc_detail_2st_fc_detail_3st_fc_detail_4st_lc_channelst_lc_detail_1st_lc_detail_2st_lc_detail_3st_lc_detail_4st_fc_landing_pagest_lc_landing_page
Optional extended fields
If you’ve enabled extended field groups in your SourceTag dashboard, also add:
st_fc_click_idandst_lc_click_id(click IDs)st_visits(visit count)st_days_to_convert(days to convert)st_device(device type)
See Captured Fields for the full list of available fields.
Step 3: Embed on your site
Embed the Typeform on your website using the Standard embed method (not popup or slider, which may not work reliably).
The embed code goes on a page that already has the SourceTag script installed. SourceTag detects the Typeform embed and populates the hidden fields.
<!-- Your site already has SourceTag -->
<script src="https://cdn.sourcetag.io/scripts/YOUR_ID/st.js"></script>
<!-- Typeform embed -->
<div data-tf-live="YOUR_FORM_ID"></div>
<script src="//embed.typeform.com/next/embed.js"></script> Step 4: Test
Visit the page with UTM parameters:
?utm_source=test&utm_medium=cpc&utm_campaign=typeform-test Complete the Typeform. Check the responses in Typeform. The hidden fields should show the attribution data.
How it works
SourceTag uses the data-tf-hidden attribute on the Typeform embed element to pass attribution data. The values are set as comma-separated key=value pairs on this attribute. Typeform reads these and maps them to the hidden fields you configured in Step 2.
Important notes
- SourceTag must be on the PAGE where Typeform is embedded, not on Typeform’s hosted URL.
- The Standard embed works best. Popup and slider embeds may have timing issues.
- If hidden fields aren’t being populated, check that the Typeform loads AFTER SourceTag’s script. SourceTag uses a MutationObserver to detect dynamically loaded forms.
- Typeform hidden fields are case-sensitive. Make sure the names match exactly.
Doesn't answer your question or need more help? Get in touch.
