# UTM parameter conditions

You'll find how to match the five UTM parameters and choose whether to use the current page, the first visit with a parameter, or retained campaign history.

Available on the Grow, Scale, and Pro plans.

You can match your website's content to the campaign link someone clicked, even before they give you an email address. **UTM Parameters** conditions let you choose which campaign value to check and how far back to look.

## What it checks

These conditions compare marketing parameters recorded in a visitor's URLs. RightMessage checks the supplied parameter. It doesn't infer an audience from an ad account or campaign name in another tool.

## When to use it

Use **On current page** when your rule should apply only while the parameter is in the URL. Use a first, most recent, or any-occurrence option when campaign context should carry across pages or visits.

For non-UTM keys, see [custom query parameter conditions](https://rightmessage.com/help/conditions-query). For the current domain, current path, or original landing page, see [Pages and visits conditions](https://rightmessage.com/help/conditions-pageviews).

## Options

### The five UTM parameters

These [WorkForge](https://workforge.rightmessage.com) values are examples, not reserved values.

| Trigger          | URL key        | Example value      |
| ---------------- | -------------- | ------------------ |
| **UTM Source**   | `utm_source`   | `newsletter`       |
| **UTM Medium**   | `utm_medium`   | `email`            |
| **UTM Campaign** | `utm_campaign` | `team-workflows`   |
| **UTM Term**     | `utm_term`     | `project planning` |
| **UTM Content**  | `utm_content`  | `remote-teams`     |

### Occurrence

Each new UTM condition starts with **On most recent occurrence** and **Equals**, with a blank comparison value.

| If you'd like to check…                      | Occurrence                    | How it works                                                 |
| -------------------------------------------- | ----------------------------- | ------------------------------------------------------------ |
| The latest recorded value for this parameter | **On most recent occurrence** | Later pages without the key don't replace it.                |
| Only the current page's parameter            | **On current page**           | Ignores the parameter on earlier pages.                      |
| The first page recorded with this parameter  | **On first occurrence**       | Uses the first recorded page containing the key.             |
| The visitor's first recorded page            | **On first ever page hit**    | Checks that page whether or not the parameter appears there. |
| Any retained page that passes the comparison | **On any occurrence**         | Applies the comparison to each retained page.                |

Each parameter is looked up separately. Source and campaign conditions in the same group can refer to different visits if those parameters were last present at different times. A group doesn't require all values to come from the same visit.

### Operators and values

All five parameters offer **Equals**, **Does not equal**, **Contains**, **Does not contain**, **Starts with**, **Ends with**, **Wildcard match**, **Is set**, and **Is not set**.

The comparison value is text. **Is set** and **Is not set** don't need a value. Text matching is case-sensitive, so `Remote-Teams` and `remote-teams` aren't the same text. Numeric-looking equality values and comma-separated alternatives follow the shared [text comparison rules](https://rightmessage.com/help/condition-builder-reference#text-operators).

Spaces and encoded values follow query parameter comparison behavior. For example, `utm_term=project+planning` can be compared with `project planning`.

## Examples

A WorkForge visitor arrives at:

```text
https://workforge.rightmessage.com/solutions/software-teams.html?utm_campaign=team-workflows
```

On a later visit to `https://workforge.rightmessage.com/`, **On most recent occurrence** with **Equals** and `team-workflows` still matches while that occurrence remains available. **On current page** doesn't match that value because the homepage URL lacks the parameter.

The screenshot below uses **UTM Campaign** with **On any occurrence** and **Contains** to match a retained campaign value containing `green`. It isn't limited to the current page.

![UTM Campaign condition matching any occurrence containing green](https://rightmessage.com/help/screens/segmentation-utm-campaign.light.webp)

## Things to know

### Missing and empty values

A missing or empty parameter on a selected current or first page counts as unset. **Is not set** can match that page.

First and most recent occurrence need a recorded page containing the key. If no such page exists, neither option matches, even with **Is not set**. An explicitly empty parameter, such as `utm_campaign=`, counts as an occurrence and can match **Is not set**.

**On any occurrence** applies the operator to each page. **Does not equal** with `team-workflows` can match an untagged page. It doesn't mean the visitor has never arrived through `team-workflows`.

### How long campaign context lasts

First, most recent, and any-occurrence rules can span visits in the same browser. A UTM condition has no duration setting. Retention depends on available browser history and attribution storage, not a fixed campaign expiry. Clearing storage, storage limits, and a different browser can remove or change the available context.

### UTM conditions and Liquid use different controls

The Liquid picker describes unqualified UTM values as first-touch data, but those values use the latest available current or stored values. Don't use that label to decide which visit a condition checks. Choose the condition's occurrence explicitly. [Data actions and Liquid](https://rightmessage.com/help/flow-data-liquid-reference) covers using those values in content and flow actions.

### A matching rule doesn't override other targeting

A UTM rule establishes whether someone qualifies for an audience. A page change still needs the relevant published personalization and a matching page target. The rule doesn't override campaign holdback, widget dismissal, or other conditions.

The [RightMessage debugger](https://rightmessage.com/help/using-the-rightmessage-debugger) shows whether the audience matches and what RightMessage actually shows the visitor.
