Form Setup
Set up SourceTag with Formstack
Formstack’s form builder includes a Hidden field type. You add one field per SourceTag data point and set the field label to match.
What you need
- SourceTag installed on your website
- A Formstack account
- The form embedded on your site using the JavaScript embed (not iframe)
Step 1: Open your form in the Formstack builder
Log in to Formstack and open the form you want to track.
[IMAGE: Screenshot of Formstack form builder]
Step 2: Add hidden fields
- In the form builder, look at the Field Types panel on the left
- Under Standard or Advanced fields, find Hidden
- Drag or click to add a Hidden field to your form
- Repeat for each SourceTag field
[IMAGE: Screenshot of Formstack field types panel showing Hidden field option]
Core fields (add these)
Add a hidden field for each of the following:
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 have 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 since first visit)st_device(device type)
[IMAGE: Screenshot of Formstack form builder showing multiple hidden fields added]
Step 3: Set the field label and name
For each hidden field:
- Click on the hidden field in the form builder
- Set the Field Label to the SourceTag field name (e.g.
st_fc_channel) - Check the Field Settings area. Formstack generates a field name from the label. Make sure the resulting
nameattribute matches the SourceTag field name exactly - Leave the default value empty
If Formstack modifies the name (for instance by adding a prefix or number), check the field settings for a way to set a custom name or use the label as-is.
[IMAGE: Screenshot of Formstack hidden field settings showing field label and name]
Step 4: Embed using JavaScript
When embedding the form on your site, use the JavaScript embed method. This renders the form in your page’s DOM so SourceTag can reach the hidden fields.
- In Formstack, go to Publish or Share
- Choose the JavaScript embed option
- Copy the code and paste it onto your page
Avoid the iframe embed, as cross-origin restrictions will prevent SourceTag from accessing the form.
[IMAGE: Screenshot of Formstack embed options with JavaScript embed highlighted]
Step 5: Test
Visit the page with UTM parameters:
?utm_source=test&utm_medium=cpc&utm_campaign=formstack-test Submit the form. In Formstack, go to Submissions and check the test entry. The hidden fields should contain your attribution data.
[IMAGE: Screenshot of Formstack submission showing populated hidden fields]
Tips
- Copy field names from the Fields page in your SourceTag dashboard to avoid typos.
- Hidden fields do not appear to visitors when the form is rendered.
- If you are using Formstack integrations (Salesforce, HubSpot, etc.), map the hidden fields to the corresponding CRM properties.
- Formstack’s JS embed is the most reliable method. If you are embedding via WordPress, the Formstack WordPress plugin renders via JS by default and should work fine.