Skip to content
TraceLead

Jotform UTM tracking through a prefilled embed URL

Jotform already prefills fields from URL parameters. TraceLead gives that URL the right values: the channel, campaign and gclid of the visit that first found you, kept since that visit and added to the form's address when it loads. They arrive in each submission as hidden fields.

No card needed. No lead caps on any plan.

  • Jotform: Tested on every release against the builder's markup
  • How we test
Added to your Jotform submissions Sample data

Added by TraceLead's hidden fields. The name and email stay in your form.

Channel
Paid search
Source / medium
google / cpc
Campaign
brand-uk
Click ID
gclid
Arrived from

Why Jotform UTM tracking misses most leads

An embedded Jotform is a frame loaded from form.jotform.com, so scripts on your page cannot write into it. Jotform's way in is the query string of that frame's URL, matched to each field's unique name.

Passing your page's own parameters through fills the fields only when the visitor submits on the page the ad pointed to. Read a second page, or come back next week, and the form loads with an empty query string.

Two visits, one submission Sample data
  1. Monday Clicks a Google ad, lands on /pricing?utm_source=google&utm_medium=cpc&utm_campaign=brand-uk&gclid=…, leaves.
  2. Thursday Types your address, opens /contact, submits the embedded Jotform.
Unique name Passed from the address Prefilled by TraceLead
channel empty paid_search
source empty google
utm_campaign empty brand-uk
gclid empty Cj0KCQjw…
landing_page empty /pricing?utm_source=google&utm_medium=cpc

TraceLead keeps the first visit in a first-party cookie on your own domain once your banner allows it, and builds the form URL from that record.

How to prefill Jotform hidden fields from URL parameters

One change in the Jotform builder, one script on your page. The form looks the same to the person filling it in.

The full Jotform guide
  1. Add the TraceLead tag to your site

    Paste the one-line script tag on every page, with your site ID, and connect your cookie banner so TraceLead knows when it may store the first touch.

  2. Add a hidden field per value in Jotform

    Add a Short Text field for each value. Under Field properties → Advanced → Field details, set its Unique name to the TraceLead field, channel, utm_source, utm_campaign and so on, then turn on the field's Hidden property.

  3. Load the form from a script

    Instead of Jotform's embed code, create the iframe once TraceLead has the stored touch. After 1.5 seconds without consent, the form loads without attribution.

    <div id="enquiry"></div>
    <script>
      window.tracelead = window.tracelead || function () { (window.tracelead.q = window.tracelead.q || []).push(arguments); };
      (function () {
        var KEYS = ['channel', 'source', 'medium', 'utm_source', 'utm_medium', 'utm_campaign', 'gclid', 'landing_page', 'first_touch_at'];
        var mounted = false;
        function mount(fields) {
          if (mounted) { return; }
          mounted = true;
          var params = new URLSearchParams();
          KEYS.forEach(function (key) {
            if (fields && fields[key]) { params.set(key, fields[key]); }
          });
          var query = params.toString();
          var iframe = document.createElement('iframe');
          iframe.src = 'https://form.jotform.com/FORM_ID' + (query ? '?' + query : '');
          iframe.title = 'Enquiry form';
          iframe.style.cssText = 'width:100%;min-height:600px;border:0';
          document.getElementById('enquiry').appendChild(iframe);
        }
        window.tracelead('touch', function (fields) { mount(fields); });
        setTimeout(function () { mount(null); }, 1500);
      })();
    </script>
  4. Test with a tagged visit

    Open your site with ?utm_source=test&utm_medium=cpc, accept cookies, then go to the page with the form. The iframe's address should end in ?channel=paid_search&source=test…. Send a test entry and open the submission.

What arrives in each Jotform submission

Each hidden field holds a plain value, stored with the submission and sent wherever your Jotform submissions go.

Need another value, such as utm_term, referrer_host or a Microsoft Ads click id? Add it to KEYS and give a hidden field the same unique name.

Jotform unique name Holds
channel The channel the first visit came from
source Where it came from
medium How it came
utm_source The utm_source on the first visit
utm_campaign The campaign name from your UTM tags
gclid Google Ads click id, for offline conversion import
landing_page The first page seen, sensitive parameters removed
first_touch_at When the first visit happened

Attribution without personal data. No names, emails, form values, IP addresses or user agents. Ever.

No privacy workarounds. Nothing before consent, no fingerprinting, no ad-blocker bypass, no cross-site identity.

Made in the UK. GBP pricing, UK consent rules in mind, and a person who answers email.

Questions, answered

Anything else? Email us and a person replies.

How do I add a Jotform hidden field for UTM values?

Add a Short Text field per value, set its unique name under Field properties → Advanced → Field details to channel, utm_source, utm_campaign and so on, and turn on the field's Hidden property. The visitor never sees it; the value is stored with the submission.

Which URL parameters does Jotform prefill?

Jotform prefills a field from a query parameter whose name is the field's unique name. A form loaded from https://form.jotform.com/FORM_ID?channel=paid_search&utm_source=google puts paid_search in the field named channel and google in utm_source.

Why are my Jotform UTM fields empty when the URL had UTM tags?

The tags were in the address of an earlier page, not the one the form loaded on. Jotform reads only the parameters in the form's own URL. TraceLead keeps the first campaign touch after consent and puts it in that URL, whichever page the form is on.

Can I keep using Jotform's embed code?

Not as it is: the pasted code loads the form with a fixed address. Create the iframe from the short script on this page instead. It uses Jotform's own form URL, with the stored attribution added as query parameters.

What does the form show before a visitor accepts cookies?

TraceLead stores nothing until your banner says yes. After 1.5 seconds without consent the script loads the form without attribution, so the visitor is never left without a form. If consent arrives later, the next page carries the values.

Does TraceLead receive what people type into the Jotform?

No. Only the attribution values travel in the URL: channel, campaign names, click ids and the landing path. The submission goes from the visitor to Jotform. Jotform stores the values you pass under its own terms, so pass only the ones you need.

Your next Jotform submission, with its source.

Add the tag, give each hidden field its unique name and load the form from the script. Nothing changes for the person filling it in.

No card needed. Cancel any time.

The whole install v1.4.0
Jotform: Short Text fields, Hidden, with unique names
channel, source, utm_campaign, gclid

The form URL your page builds:
https://form.jotform.com/FORM_ID?channel=paid_search&utm_source=google&gclid=…