Add

Lorem ipsum

Lorem ipsum

A
A
A
Tracking

0 views

4 min

How to Pre-Fill a Webflow Form from URL Parameters and UTM Tags

Learn how to automatically prefill Webflow form fields from URL and UTM parameters.

In this tutorial, Sandro, co-founder of the Gemeos Webflow agency, shows you how to automatically prefill Webflow form fields from UTM parameters or URL parameters.

Example

Copy the test URL and add it to the end of this page's URL

?prenom=Jean&email=jean@acme.com&utm_source=linkedin
prenom —
email —
company —
utm_source —
URL parameterTarget fieldURL example
utm_sourceinput[name='utm-source']?utm_source=linkedin
utm_campaigninput[name='utm-campaign']?utm_campaign=product-launch
prenom#prefill-prenom?prenom=Jean
email#prefill-email?email=jean@acme.com
entreprise#prefill-entreprise?entreprise=Acme

Use cases

This script is especially useful for multi-step conversion funnels: you pass data from one page to the next through the URL, and each form gets prefilled automatically. It also works well for personalized email campaigns: a link with ?prenom=Jean&entreprise=Acme opens a form that's already partially filled in, which reduces friction.

1. Set up your fields in Webflow

For each field you want to prefill, add a custom name attribute or an id that matches the URL parameters. For example, on the Email field, add name="email". On the First name field, add id="prefill-prenom".

2. Hide the UTM fields (optional)

For the UTM fields you want to send with the form without showing them to the user, create input type="hidden" fields in an Embed. The script will fill them in and send them with the submission.


3. Add the script in Footer code

Customize the mapping based on the parameters you use in your URLs.

(function() {
var params = new URLSearchParams(window.location.search);
var mapping = {
'utm_source': 'input[name="utm-source"], #utm-source',
'utm_medium': 'input[name="utm-medium"], #utm-medium',
'utm_campaign': 'input[name="utm-campaign"], #utm-campaign',
'utm_content': 'input[name="utm-content"], #utm-content',
'utm_term': 'input[name="utm-term"], #utm-term',
'prenom': 'input[name="prenom"], #prefill-prenom',
'email': 'input[name="email"], #prefill-email',
'entreprise': 'input[name="entreprise"], #prefill-entreprise',
};

Object.keys(mapping).forEach(function(param) {
var value = params.get(param);
if (!value) return;
document.querySelectorAll(mapping[param]).forEach(function(el) {
el.value = value;
el.dispatchEvent(new Event('input', { bubbles: true }));
});
});
})();

good to know

Combine this script with our tutorial on UTM tracking in Webflow for full tracking of where your conversions come from. The hidden UTM fields sent with the form let you attribute each lead to its source in your CRM.

Conclusion

Prefilling from UTMs reduces friction and improves form completion rates. Use cases:

  • Nurture emails with a link to a prefilled demo form
  • LinkedIn Ads campaigns with prefilled first names and companies
  • Multi-step funnels that pass data between pages

UTM parameters detected in the current URL

No UTM parameters in the current URL. Add ?prenom=Jean&utm_source=linkedin to the URL to test it.

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...