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.
[IMAGE: Screenshot of Typeform editor]
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
Fields to add
Add each of these as a separate hidden field:
Core: st_fc_channel, st_fc_detail_1, st_fc_detail_2, st_fc_detail_3, st_fc_detail_4, st_lc_channel, st_lc_detail_1, st_lc_detail_2, st_lc_detail_3, st_lc_detail_4, st_fc_landing_page, st_lc_landing_page
Optional: st_fc_click_id, st_lc_click_id, st_visits, st_device
[IMAGE: Screenshot of Typeform hidden fields settings]
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" async></script>
<!-- Typeform embed -->
<div data-tf-live="YOUR_FORM_ID"></div>
<script src="//embed.typeform.com/next/embed.js"></script> [IMAGE: Screenshot of Typeform embed on a webpage]
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.
[IMAGE: Screenshot of Typeform response showing hidden field values]
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.