Back to the Blog
Essay

Marketo UTM Tracking: Everything You Need to Know

Marketo UTM tracking done right: what each parameter does, the form code to capture UTMs as hidden fields, and the naming rules that keep attribution clean.

By Sean Gowing
Mar 17, 20237 min read

A lead fills out a form on your site. It lands in Marketo. And then someone in RevOps spends Friday night squinting at the record, trying to figure out which campaign actually sent them. Marketo UTM tracking fixes that by stamping every inbound link with parameters — source, medium, campaign — and then carrying those tags into the form as hidden fields, so the "where did this lead come from" question answers itself.

That's the whole game. Tag the link, capture the tag on the form, map it to a Marketo field. Do it consistently and your attribution is trustworthy. Do it sloppily and your best channel disappears into the (Other) bucket where bad data goes to die.

I've been doing GTM tagging and attribution work for seven years, on pipelines that have moved hundreds of millions in spend. The pattern below is the one I'd hand a client. If you'd rather hand the whole thing off, our tracking and analytics team wires up UTM capture and closed-loop attribution end to end.

Need a tagged link right now? Use our free UTM builder to generate clean UTM codes in seconds — no sign-up, runs in your browser.

What is Marketo UTM tracking?

Marketo UTM tracking is the practice of adding UTM parameters to the URLs in your campaigns, then capturing those values on your Marketo forms so each lead carries its own origin story into the CRM. The link tells you where the click came from. The form captures it. The record remembers it.

UTMs themselves aren't a Marketo feature — they're a Google Analytics convention that everything else reads. Marketo's part is grabbing those values off the URL and stashing them on the lead record so they survive past the click.

The five UTM parameters, and what each one is actually for

Every tagged URL is built from the same five elements. Use them for what they're meant for, not whatever's convenient at 11pm.

  1. utm_source — where the traffic came from: google, linkedin, newsletter.
  2. utm_medium — how it got there: cpc, email, social. This is the one people break the most.
  3. utm_campaign — the specific push: spring-launch, q3-webinar.
  4. utm_term — paid keywords. Mostly auto-tagged by ad platforms; you rarely set it by hand.
  5. utm_content — the variant: which ad, which button, which email link.

Add those to a link, and analytics can tell you how many people clicked, where they came from, and what they did next. Capture them on the form, and Marketo can tell you which of those clicks turned into pipeline. For a deeper look at how the pieces fit, our guide to UTM formats and how they impact your pipeline goes one layer down.

How to set up Marketo UTM tracking

Here's the sequence. Nothing exotic — but the order matters and the field mapping is where people quietly break their data.

  1. Create the Marketo custom fields. Before you capture anything, you need somewhere to put it. Make custom fields for each UTM value (the code below uses utm_source__c, utm_medium__c, and so on). No field, no capture.
  2. Build clean tagged URLs. Use the five parameters above. Lowercase, consistent, no spaces. This is the step that decides whether your reporting is usable later.
  3. Add UTMs to your campaign links. Every inbound link — ads, email, social — gets tagged. Internal links do not; tagging your own internal links overwrites the original source and corrupts attribution.
  4. Capture the UTMs on the form. Pull the values off the URL and write them into the form's hidden fields. The code for that is below.
  5. Track and report. With the values landing on the lead record, you can finally tie a closed deal back to the campaign that started it.

To capture UTMs on the form, you can use code like this:


MktoForms2.whenReady(function (form) {
  let formId = form.getId();
  let utm = getUTM();
  let temp = navigator.userAgent;
 form.addHiddenFields({
    utm_source__c: (utm["utm_source"] == undefined) ? '' : utm["utm_source"],
    utm_medium__c: (utm["utm_medium"] == undefined) ? '' : utm["utm_medium"],
    utm_campaign__c: (utm["utm_campaign"] == undefined) ? '' : utm["utm_campaign"],
    utm_content__c: (utm["utm_content"] == undefined) ? '' : utm["utm_content"],
    utm_term__c: (utm["utm_term"] == undefined) ? '' : utm["utm_term"],
    GCLID__c: (utm["gclid"] == undefined) ? '' : utm["gclid"],
    FBCLID__c: (utm["fbclid"] == undefined) ? '' : utm["fbclid"],
    conversion_source__c : "",
    browser: temp,
  });
  

A couple of things worth noting in that snippet. It also grabs gclid and fbclid — the Google and Facebook click IDs — which are what let you reconcile back to the ad platforms even when a UTM is missing. And every value falls back to an empty string if the parameter isn't present, so a clean direct visit doesn't write undefined into your CRM. The same getUTM() pattern works in Webflow too — here's the worked example of capturing UTMs in a Webflow form.

Why bother: what UTM tracking actually buys you

The payoff isn't "more data." It's data you can act on.

  • Attribution you trust. You can name the campaign that produced a closed-won deal instead of guessing. That's the difference between a budget decision and a budget hunch.
  • No more paying to retarget buyers. When the lead record knows the source, the ad platforms can stop chasing people who already converted. I've watched companies burn real money re-marketing to customers who were already paying invoices, purely because nothing told the ad account the deal had closed.
  • A signal path from click to closed-won. Tagged link, captured form, mapped field — that's an unbroken chain. When it's intact, the whole funnel is legible.

Best practices for Marketo UTM tracking

This is where most setups quietly fall apart. Mapping is the part nobody respects until it bites them — one wrong value and the whole attribution chain breaks downstream.

  • Pick a naming convention and never deviate. cpc and CPC and paid-cpc are three different mediums to a machine. Off-spec mediums vanish into the (Other) bucket and never come back. Consistency beats cleverness every single time.
  • Lowercase everything. UTMs are case-sensitive. Google and google will split one source into two rows in your reports. Pick lowercase and enforce it.
  • Only tag inbound links. Tagging links between your own pages rewrites the original source on every internal click. It's one of the most common self-inflicted attribution wounds I see.
  • Don't over-tag. Use the parameters that map to a real decision you'll make. Five fields you actually report on beat nine you ignore.
  • Mind character limits. Some platforms truncate long URLs. Keep tags short and readable; a shortener can help where it won't strip the parameters.
  • Audit periodically. Campaigns drift, new team members invent their own conventions, and the (Other) bucket creeps back up. A quarterly pass keeps the data honest.

If you're also running GA4, get the measurement layer right while you're in here — our conversion tracking setup guide for Google Analytics covers the other half of this.

Frequently asked questions

What is a UTM parameter? It's a tag added to a URL — like utm_source=linkedin — that tells your analytics and CRM where a visitor came from and which campaign sent them. Five of them exist: source, medium, campaign, term, and content.

Do I need Marketo to use UTMs? No. UTMs are a Google Analytics convention that works with any tool. Marketo's role is capturing those values off the URL and writing them to the lead record so they persist past the click.

Why do my UTMs keep showing up as "(Other)"? Almost always an off-spec utm_medium. Analytics groups recognized mediums (email, cpc, social) and dumps everything else into (Other). Stick to standard, lowercase medium values and the bucket shrinks.

Should I tag links between my own pages? No. Internal UTM tagging overwrites the original source, so a visitor who arrived from a paid ad gets relabeled the moment they click an internal link. Only tag inbound links from outside your site.

What are gclid and fbclid doing in the form code? Those are the Google and Facebook click IDs. Capturing them lets you reconcile a lead back to the exact ad click, which matters when a UTM is missing or stripped along the way.

How often should I audit my UTM setup? Quarterly is a sane default. Conventions drift as new people and campaigns come online, and a periodic audit catches the (Other) creep before it muddies a full quarter of reporting.

UTMs aren't glamorous. But when a tagged link, a captured form, and a mapped field line up, you stop guessing where revenue comes from — and that's worth a lot more than a prettier dashboard. If your setup is leaking attribution somewhere between the click and the CRM, that's exactly the plumbing our tracking and analytics team untangles.

Want this for your team?

Send us a brief and we'll come back with a fixed-price plan in 48 hours.