Form Setup
Set up SourceTag with Wufoo
Wufoo (by SurveyMonkey) supports hidden fields that SourceTag can populate with attribution data. You add the hidden fields in Wufoo’s form builder, then embed the form on your site using the JavaScript embed method.
What you need
- SourceTag installed on your website
- A Wufoo account
- The form embedded on your site using the JavaScript embed (not iframe)
Step 1: Open your form in the Wufoo form builder
Log in to Wufoo and click Edit on the form you want to track. This opens the drag-and-drop form builder.
[IMAGE: Screenshot of Wufoo form builder]
Step 2: Add hidden fields
Wufoo does not have a dedicated hidden field type in the builder palette. Instead, you use a Single Line Text field and hide it with CSS, or you use the Add Hidden Values option in the form settings.
Option A: Use the “Add Hidden Values” setting (recommended)
- In the form builder, click the Form Settings tab (or gear icon)
- Scroll to Hidden Field Values or Custom Hidden Fields
- Add a new hidden field for each SourceTag data point
- Set the field name to match the SourceTag field name exactly
Option B: Use a Single Line Text field with CSS
- Drag a Single Line Text field onto your form
- Set the field label to the SourceTag field name
- After embedding the form, use custom CSS to hide the field (
display: none)
Option A is cleaner if your Wufoo plan supports it. Option B works on all plans.
[IMAGE: Screenshot of Wufoo form settings showing hidden field configuration]
Core fields (add these)
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)
Step 3: Set the field API name
For each hidden field, make sure the underlying field name (the one used in the HTML name attribute) matches the SourceTag field name exactly. In Wufoo, the API label or field alias controls this.
- Click on the field in the builder
- Find the API Label or Field Alias setting in the field properties
- Set it to the SourceTag field name (e.g.
st_fc_channel) - Leave the default value empty
If Wufoo assigns its own internal name (like Field1, Field2), you may need to edit the embed code after generating it. See the tips section below.
[IMAGE: Screenshot of Wufoo field properties showing the API label setting]
Step 4: Embed using JavaScript (not iframe)
- In Wufoo, click Share on your form
- Choose Embed Form
- Select the JavaScript embed method
- Copy the embed code and paste it onto your page
<!-- Your site already has SourceTag -->
<script src="https://cdn.sourcetag.io/scripts/YOUR_ID/st.js" async></script>
<!-- Wufoo JS embed -->
<script type="text/javascript">
var YOUR_FORM_HASH;
(function(d, t) {
var s = d.createElement(t), options = {
'userName':'YOUR_USERNAME',
'formHash':'YOUR_FORM_HASH',
'autoResize':true,
'async':true,
'host':'wufoo.com',
'header':'show',
'ssl':true
};
s.src = ('https:' == d.location.protocol ? 'https://' : 'http://') + 'secure.wufoo.com/scripts/embed/form.js';
s.onload = s.onreadystatechange = function() {
var rs = this.readyState; if (rs) if (rs != 'complete') if (rs != 'loaded') return;
try { YOUR_FORM_HASH = new WufooForm(); YOUR_FORM_HASH.initialize(options); YOUR_FORM_HASH.display(); } catch (e) {}
};
var scr = d.getElementsByTagName(t)[0], par = scr.parentNode; par.insertBefore(s, scr);
})(document, 'script');
</script> Avoid the iframe embed. It loads the form on Wufoo’s domain, and SourceTag cannot access the fields across origins.
[IMAGE: Screenshot of Wufoo embed options with JavaScript embed selected]
Step 5: Test
Visit the page with UTM parameters:
?utm_source=test&utm_medium=cpc&utm_campaign=wufoo-test Submit the form. In Wufoo, go to Entries and check the test submission. The hidden fields should contain your attribution data.
[IMAGE: Screenshot of Wufoo entry showing populated hidden fields]
Tips
- Wufoo uses internal field names (like
Field1,Field2) by default. If you cannot change the API label to match SourceTag’s field names, you have two options: (1) edit the rendered HTML using JavaScript on your page to rename thenameattributes, or (2) use your SourceTag field mapping settings to match Wufoo’s internal field names. - Field names are case-sensitive. Copy them from the Fields page in your SourceTag dashboard.
- Wufoo integrations (email notifications, webhooks, Zapier, etc.) include hidden field values in the submission data.
- If hidden fields come through empty, inspect the form HTML in your browser dev tools. Check that the
nameattributes match the SourceTag field names and that the form is rendered in the same page (not in an iframe). - The JavaScript embed renders the form directly in the page DOM, which is what SourceTag requires to populate hidden fields.