On this page
  1. Create a field for each UTM parameter
  2. Capture UTM values with hidden form fields
  3. Add UTM parameters to Marketo email links
  4. Keep tokenized links tracked
  5. What mkt_tok, mktNoTrack and mktNoTok change
  6. How Marketo Measure maps UTM parameters
  7. Check a link before it goes out
  8. Sources

UTM (Urchin Tracking Module (opens in a new tab)) tracking in Marketo Engage has two halves. On the way out, you add UTM parameters to each URL (opens in a new tab) by hand, in the email editor's Insert/Edit Link (opens in a new tab) box. On the way in, you store the values a visitor arrives with in hidden form fields (opens in a new tab) that read a URL parameter from the page the form is on. If a link's address comes from a token, type https:// outside the token: Marketo adds click tracking before it fills in tokens (opens in a new tab), so a token that carries its own https:// is not tracked.

Create a field for each UTM parameter

The values need somewhere to be stored, so start with one custom field (opens in a new tab) per parameter you want to keep, for example UTM Source, UTM Medium and UTM Campaign:

  1. In My Marketo, click Admin, then Field Management.
  2. Click New Custom Field and choose the Object.
  3. Choose the field Type. The type changes how the field is shown in Smart Lists and forms.
  4. Enter the Name as it should appear in Marketo. Marketo generates the application programming interface (API) name, and the field cannot be renamed after saving, so settle the naming first.
  5. Click Create.

If the fields should stay in sync with your customer relationship management (CRM) system, create them in the CRM instead: they are then created in Marketo automatically. Once a field exists, you can use it in forms, flow steps and Smart Lists.

Build a campaign link

Create a UTM link with the free builder. No account needed.

Capture UTM values with hidden form fields

Hidden form fields (opens in a new tab) capture data without the visitor's input. To add them:

  1. Go to Marketing Activities, select your form and click Edit Form.
  2. Add a field for each UTM value, select it and set its Field Type to Hidden.

Then tell each hidden field where its value comes from (opens in a new tab):

  1. Select the hidden field and click Edit for Autofill.
  2. Select URL Parameter for Get Value Type.
  3. Enter the Parameter Name, for example utm_source, and click Save. You can also enter a Default Value for when the URL parameter is not found.
  4. Click Finish, then Approve and Close.

URL Parameter reads the query string of the page the person is on when they fill out the form. Point your tagged links at the page that holds the form. Where they cannot, two other sources help in narrower cases:

  • Cookie Value picks up data you store in cookies when the form is submitted.
  • Referrer Parameter reads a parameter from the page the visitor came from before filling out the form.

You can add UTM parameters to a URL (opens in a new tab) manually, and Google says to always use utm_source, utm_medium and utm_campaign. In Marketo, the email editor's Insert/Edit Link (opens in a new tab) button puts in a link to a website, and its URL box also takes tokens (opens in a new tab) for extra and person-specific parameters:

  1. Select your email, click Edit Draft and double-click an editable area.
  2. Write or find the link text, highlight it and click the Insert/Edit Link icon.
  3. In URL, enter the tagged link, with any tokens, and click Insert.
  4. Click Save.

Start every URL with https://: Marketo finds the links it tracks by searching the email code for http or https (opens in a new tab) and wraps its tracking code around them. After the https://, a tagged link to a webinar page could look like this:

www.example.com/webinar?utm_source=marketo&utm_medium=email&utm_campaign=spring-webinar

utm_medium=email meets the medium side of the Google Analytics 4 (GA4) Email channel rule (opens in a new tab), which matches email, e-mail, e_mail or e mail in the source or the medium. When no channel rule matches, GA4 reports the traffic as Unassigned. For how each medium value lands, see the GA4 default channel group guide; for email-specific values across platforms, see UTM parameters for email.

GA4 treats parameter values as case sensitive: utm_source=google and utm_source=Google are different values. Use lowercase as the standard and keep one spelling per source and campaign; a shared list helps, see UTM naming conventions.

When a link comes from a token and shows no clicks (opens in a new tab), the order Marketo builds the email in explains it:

  1. Marketo searches the email code for http or https and wraps the tracking code around each URL.
  2. Marketo inserts the token values.

Marketo does not go back to wrap tracking around an http or https that arrives inside a token value. So type https:// in the email, in front of the token, and leave it out of the token's value. Do not put it in both places either: https:// outside a token whose value also starts with https:// breaks the link.

For a URL stored in a My Token (opens in a new tab), give the token a unique name and enter the URL without https://. In the email, type https:// with no space after it, click the Insert Token icon and insert your My Token. Then highlight the https:// and the token and cut them, highlight the text the link should display, click the Insert/Edit Link icon, paste into the URL box and click Insert. Do not leave the protocol out altogether: Adobe warns that the web version of the email could then render incorrectly. With https:// in front of the token, the URL fills in after sending as a trackable link.

What mkt_tok, mktNoTrack and mktNoTok change

Each link in the email editor's Edit Link pop-up has a Track Link checkbox and an Include mkt_tok checkbox. Adobe's guide to disabling link tracking (opens in a new tab) explains what each does:

  • Unchecking Include mkt_tok keeps the click tracked, but the destination URL no longer carries the mkt_tok query string parameter after the redirect. Marketo landing pages and Munchkin, Marketo's JavaScript that tracks page visits and link clicks (opens in a new tab), use that parameter to track person activities, so Adobe advises leaving it on unless it causes odd behaviour on your website.
  • Unchecking Track Link turns tracking off for the link. That helps when the destination page does not support URL parameters, and for links that must keep working: if an email was sent over 365 days ago and none of its links was clicked in the last 180 days, Marketo Engage prunes the route to the URL, and the link breaks.

In an email template or the text version of an email, disable click tracking by putting the mktNoTrack class at the start of the link's tag, as in <a class="mktNoTrack" href="…">, not at the end: otherwise the link could disappear. The two classes (opens in a new tab) differ:

  • mktNoTrack: Marketo adds no tracking link, so the recipient is not redirected through the tracking server. Use it when you do not want Clicked Link in Email events recorded.
  • mktNoTok: Marketo leaves mkt_tok off the target link. The click is still tracked, but the person's lead information is not carried onto the page for functions such as form pre-fill.

That matters for forms: since April 24, 2019, Marketo has pre-filled landing page forms (opens in a new tab) only when the URL that led to the page carries a valid mkt_tok value, which happens when someone clicks a tracked link in a Marketo email.

How Marketo Measure maps UTM parameters

If you also use Marketo Measure, it parses the five UTM parameters (opens in a new tab) into these touchpoint fields:

UTM parameter Marketo Measure field
utm_medium Medium
utm_source Touchpoint Source
utm_campaign Ad Campaign Name
utm_content Ad Content
utm_term Keyword Text

Marketo Measure's best practices (opens in a new tab) use utm_medium for the high-level channel, such as social or email, and put the subchannel in utm_source, not in the medium. They also recommend underscores instead of spaces and no punctuation, which reduces the chance of browser encoding errors. For the split between the two parameters, see UTM source vs medium.

Before you send, copy the tagged URL you entered for the link and paste it into the UTM link checker. If the URL holds tokens, type real values in their place first. It shows what is wrong with the tags, which GA4 default channel the link should land in, and a fixed link to copy. Check the URL you typed, not a link copied from a test email: a tracked Marketo link (opens in a new tab) sends the recipient through the tracking server before the target URL, and the checker reads the text of the link only. It does not open the page, follow redirects or check that your analytics tag is installed. For links you share outside Marketo, the free UTM builder lowercases values and replaces spaces with hyphens as you type.

Sources

Tools for this

Frequently asked questions

How do I capture UTM parameters in a Marketo form?

Add a hidden field for each parameter, click Edit for Autofill, choose URL Parameter and enter the parameter name, such as utm_source. It reads the query string of the page the person is on when they fill out the form.

Why are clicks on my tokenized Marketo link not tracked?

Marketo wraps click tracking around http or https links before it fills in token values, so a token that carries its own https:// is never wrapped. Type https:// in front of the token in the email and leave it out of the token's value.

What is mkt_tok in Marketo links?

A query string parameter on the destination URL of tracked links in Marketo emails. Marketo landing pages and Munchkin use it to track person activities, and Marketo pre-fills landing page forms only when the URL carries a valid mkt_tok.

Build a campaign link

Create a UTM link with the free builder. No account needed.