Skip to content

Tracking6 min read

Track where your conversions come from with UTM parameters in Webflow

Video

UTM parameterJS variableUse
utm_sourceutmSourceOriginal platform (Google, Facebook, LinkedIn...)
utm_mediumutmMediumChannel type (CPC, email, social...)
utm_campaignutmCampaignCampaign name
utm_contentutmContentContent variant (A/B test)

In this episode, Sandro, co-founder of the Gemeos Webflow agency, shows you how to track where your conversions come from using UTM parameters in Webflow.

1. Add the custom code to capture the UTM parameter and store it in session

Add this custom code to the head of each of your landing pages

<script>
  // Retrieve the value of the "utm_source" parameter from the URL and store it in session
  var utmSource;
  if (!sessionStorage.getItem("utmSource")) {
 utmSource = new URL(window.location.href).searchParams.get("utm_source") || "google";
  sessionStorage.setItem("utmSource", utmSource);
} else {
  utmSource = sessionStorage.getItem("utmSource");
}
</script>

2. Add fields to your form to pass along the UTM parameters

Make sure you set these fields to display: none. Your leads don't need to see them, and showing them could hurt your conversion rate.

3. Add an ID to each field you use to pass along values

4. Add the custom code to display the UTM parameter in your form fields

< script>
// Get the HTML element corresponding to the form field
var leadSource = document.getElementById("leadSource");
// Update the HTML element value to display firstPage
leadSource.value = utmSource;

Make sure you replace "leadSource" with the ID value you set earlier

5. Publish your site and test the result

Published on Apr 10, 2025

Sandro DA SILVA

Growth Marketer, Webflow expert, and jack-of-all-trades. Sandro handles commercial operations, ensures projects run smoothly, and addresses marketing-related issues (SEO, Tracking, Copywriting, etc).

You're going to working with us, guaranteed

Ready to launch your business?

get a quote

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