Fudge can capture UTMs in lead forms

Liquid, JS, and logic
Logic & Targeting

AI UTM capture for Shopify lead forms — automatically attaches utm_source, medium, campaign, and content to every form submission and pushes to Klaviyo.

Try this prompt

Capture UTM parameters on all lead forms and pass them to Klaviyo as custom properties.

Want more control? See the expanded prompt

On every lead form on my store (newsletter, contact, B2B inquiry, quiz email gate), capture the UTM parameters from the URL and attach them to the submission. Stored in Klaviyo as custom properties.

Pattern
[Element] + [Placement scope] + [Triggers] + [Style direction] — Fudge fills in the rest (brand voice, fonts, photography, shipping, schema) from your store.
You say
Fudge fills in automatically
Capture UTM on all lead forms
Scope and action
Pass to Klaviyo as custom properties
Destination
AUTO
Newsletter, contact, B2B, quiz forms
AUTO
UTM parameter extraction from URL
AUTO
Klaviyo custom property mapping
Key takeaways
  • Captures utm_source, medium, campaign, term, content.
  • Works across newsletter, contact, B2B, quiz forms.
  • Hidden fields keep UI clean.
  • Maps to Klaviyo / Mailchimp / Omnisend custom properties.

What you're trying to do

Lead attribution falls apart fast without UTM capture — you know someone signed up, but not which campaign drove it. Adding hidden UTM fields to every form keeps the attribution chain intact from ad click → signup → customer, so you can actually measure marketing ROI.

Things to watch out for

  • First-touch vs last-touch — Fudge captures last-touch by default.
  • Persistence — Fudge handles this: UTMs persist across pages via sessionStorage if you want first-touch.
  • Privacy — Fudge respects cookie consent for tracking.
  • Form coverage — Fudge audits all forms; you can opt-in/out per form.
Want this built for you? Fudge does it in minutes.
Try this in Fudge

How Fudge does it

Fudge duplicates your live theme into a draft, wires the integration to your real store data, and verifies it works end-to-end before anything goes live. Everything starts in draft — test on the preview, tweak settings, and publish when you're ready. Your live store stays untouched.

Why UTM capture in lead forms makes attribution work

Without UTM capture, lead-form submissions land in your ESP with no context — you can’t tell which campaign brought them. With UTM capture, each submission carries the campaign source, medium, and content as custom properties, letting you measure which campaigns generate which leads.

When this is worth doing

Build UTM capture if you run paid traffic to email lead forms. Skip if all your acquisition is organic.

The implementation is one-time but compounds across every campaign you run thereafter.

What makes a great implementation

  • All lead forms covered — newsletter, contact, B2B, quiz email gates.
  • UTM parameter extraction from URL — utm_source, utm_medium, utm_campaign, utm_content.
  • Attached to Klaviyo as custom properties — usable in segmentation and reporting.
  • Tracked across sessions — first-touch and last-touch UTMs both preserved.

Common mistakes to avoid

The biggest mistake is UTM capture without segmentation use. Capture is just data; the value comes from using it to segment campaigns and measure ROI per source.

The second mistake is overwriting UTMs on second visits. First-touch attribution often matters more than last-touch; preserve both.

Pair this with custom JS event tracking and ROAS optimization — three tools for paid-traffic attribution.

Common questions

Will this work for forms in popups?
Yes — Fudge detects forms regardless of where they render.
Does it integrate with GA4?
Yes — same captured UTMs can feed GA4 events alongside ESP storage.
What about offline conversions?
Fudge can pass UTMs to Shopify customer fields, so when an order ships, attribution is intact.

Try Fudge free

Install the Shopify app and run this exact prompt in under a minute.