Form Setup
Set up SourceTag with SurveyMonkey
SurveyMonkey surveys are embedded as iframes. SourceTag can’t directly populate fields inside an iframe, but it can pass attribution data via URL parameters using the iframe handler.
What you need
- SourceTag installed on the page where the survey is embedded
- A SurveyMonkey survey with custom variables enabled
Step 1: Set up custom variables in SurveyMonkey
- Open your survey in SurveyMonkey
- Go to Options > Custom Variables
- Add variables for each SourceTag field you want to capture:
st_fc_channel
st_fc_detail_1
st_fc_detail_2
st_lc_channel
st_lc_detail_1
st_fc_landing_page Add as many as you need. Each custom variable maps to a SourceTag field.
See Captured Fields for the full list of available fields.
Step 2: Update your embed code
Find your SurveyMonkey embed code on the page. Add the data-st-iframe attribute to the iframe element:
<iframe
src="https://www.surveymonkey.com/r/YOUR_SURVEY_ID"
data-st-iframe
width="100%"
height="600"
></iframe> The data-st-iframe attribute tells SourceTag to append attribution data as URL parameters to the iframe src.
Step 3: Map the parameters
SurveyMonkey reads custom variables from URL parameters automatically. When SourceTag appends ?st_fc_channel=Paid+Search&st_fc_detail_1=google to the iframe URL, SurveyMonkey maps those to the matching custom variables.
Make sure the custom variable names in SurveyMonkey match the SourceTag field names exactly.
Step 4: Test
Visit the page with UTM parameters:
?utm_source=test&utm_medium=cpc&utm_campaign=test-campaign Submit the survey. In SurveyMonkey, go to Analyse Results > Individual Responses. Check the custom variables for the response. You should see the attribution data.
How it works
SourceTag’s iframe handler detects elements with the data-st-iframe attribute. It reads the attribution data from the cookie and appends it as URL query parameters to the iframe’s src URL. SurveyMonkey then reads those parameters as custom variables.
This is the same approach used for Zoho Forms, Calendly embeds, and other iframe-based tools.
Limitations
- Only works for surveys embedded on your own site (not for SurveyMonkey-hosted survey links)
- Custom variables are limited in SurveyMonkey’s free plan. You may need a paid plan for more than a few variables.
- The survey URL in the iframe changes when parameters are appended, which triggers a reload. This is normal.
Tips
- Start with just the core fields (channel, smart field 1, smart field 2, landing page) to keep the custom variable count manageable
- You can view custom variable data in SurveyMonkey exports (CSV/Excel) for reporting
- If you send SurveyMonkey responses to a CRM via Zapier, the custom variables are available as fields in the Zapier trigger
Doesn't answer your question or need more help? Get in touch.
