JotForm logo

JotForm

Jotform UTM tracking and lead source capture

Jotform can carry the campaign, keyword and click ID through to your submissions, but only if the form is embedded with the JavaScript code rather than an iframe. That one setting is where most Jotform attribution setups fail.

Your website

Script installed

SourceTag

Captures attribution

JotForm

Hidden fields sent

Your tools

Data arrives tagged

The problem

JotForm captures what people type into the form. It has no idea how that visitor found your site, or which ad they clicked to get there. That data lives in the URL and the referrer, not in anything JotForm can see on its own.

How to set it up

Add a handful of hidden fields to your JotForm form. SourceTag's script finds them and fills them in the moment someone hits submit, so the channel, click ID and landing page arrive with the rest of the entry.

1

Get SourceTag running

Paste the SourceTag script into your site header.

2

Name the hidden fields to match

In JotForm, add hidden fields called st_fc_channel, st_fc_detail_1 and so on. Your SourceTag dashboard has the full list.

3

Submit one test entry

Load your site with ?utm_source=test&utm_medium=cpc, submit the form, and look for the attribution data on the entry.

The embed method decides whether this works at all

The iframe embed loads your form on jotform.com. Your page and the form are then on different origins, and browser security stops the SourceTag script on your site from touching any field inside it. Nothing you do to the hidden fields will help.

The JavaScript embed, called Source Code in the publish dialog, renders the form into your own page. The inputs become part of your DOM, so the script can find them by name and fill them in.

<!-- Works: JS embed -->
<script type="text/javascript"
  src="https://form.jotform.com/jsform/YOUR_FORM_ID"></script>

<!-- Does not work: iframe embed -->
<iframe src="https://form.jotform.com/YOUR_FORM_ID"></iframe>

Add the hidden fields

Hidden Field sits under Form Elements in the Add Form Element panel. Some Jotform accounts list it under Widgets instead. Either one is the same element.

1

Open the form in the Jotform builder

Click Add Form Element, then search for hidden.

2

Add one Hidden Field per SourceTag field

Twelve for the core set: st_fc_channel, st_fc_detail_1 to st_fc_detail_4, st_fc_landing_page, and the six st_lc_ equivalents.

3

Set the Field Name, not just the label

With the field selected, find Field Name or Unique Name in the properties panel on the right and set it to the SourceTag name exactly. That value becomes the input name attribute, and the name is what the script matches on. Leave the default value empty.

4

Publish with the Source Code embed

Publish > Embed > Source Code, then paste the script tag into your page. If your page source contains an iframe pointing at jotform.com, you have the wrong embed.

What each field will contain

st_fc_channel holds the channel from the visitor's first ever visit, st_lc_channel the channel from their most recent one. The eight detail fields carry the useful specifics, and what those specifics are depends on the channel: utm_source, utm_campaign, utm_term and utm_content for Paid Search and Paid Social, the search engine and referrer URL for Organic Search, the referring domain and URL for Referral, nothing at all for Direct.

st_fc_landing_page and st_lc_landing_page store the path and query string of the page they arrived on, with UTM parameters and click IDs stripped out. So /personal-injury?ref=nav keeps the ref and loses the utm_source.

Enable the extended groups in your dashboard if you also want click IDs, raw UTM values, or st_visits, st_days_to_convert and st_device. Add a matching hidden field for each one you turn on. Full field list.

Test it with a UTM link

Open the page with the embedded form using a tagged URL, then submit.

Jotform stores hidden fields with everything else, so the values appear in Submissions and in the notification email. They also flow through Jotform integrations, so a form wired to Google Sheets, a CRM or Zapier carries the attribution with it.

If the hidden fields are empty, inspect the rendered form in dev tools before blaming the cookie. The input name attribute has to read st_fc_channel, not a Jotform-generated id like q12_hidden. That means the Unique Name was never set.

https://yoursite.com/quote?utm_source=google&utm_medium=cpc
  &utm_campaign=lead-gen&utm_term=roof+repair+quote

Safari, ad blockers and returning visitors

Safari and every browser on iOS limit JavaScript cookies to seven days. A visitor who first found you through a Google ad two weeks ago comes back as a new visitor, and first click reads Direct. To keep it, set the cookie from a server: the Cloudflare Worker does this for any site behind Cloudflare, and the WordPress plugin does it on WordPress.

When an ad blocker stops the script, the Jotform submission still goes through with every visible field intact. The st_ fields arrive empty. Nothing breaks for the person filling in the form.

Common mistakes

Typing the field name from memory. It is st_fc_detail_1, with underscores, and one wrong character produces an empty field with no error anywhere. Copy the names from the Fields page in your dashboard.

Leaving a default value on the hidden field. Jotform submits the default and it looks like nothing was captured.

Testing with an ad blocker running. Most blockers leave the script alone, but a strict setup can stop it, and you will spend an hour debugging a form that is fine.

Worrying about subdomains. The cookie is set on the root domain, so a form on pages.yoursite.com sees the same attribution as one on www.yoursite.com. Separate top level domains each need their own site.

Where your data ends up

JotForm sends form data to your CRM, email tool, or wherever you've connected it. The attribution data rides along in the hidden fields.

Frequently asked questions

Related integrations

Start with one form.

The trial is 14 days and doesn't need a card.