# Targeting by traffic source

Canonical URL: https://support.optimonk.com/en/articles/visitor-attribute-targeting

Your visitors don't all arrive the same way. Someone who clicked a Google Ad has already seen your offer; someone who typed your address in has not. The **Source** targeting rule lets you show a different message to each — including matching a specific `utm_source` value, so the popup can pick up exactly where your ad copy left off.

---

## Add the Source rule

1. Open **Campaigns** in the left menu and click the campaign you want to target.
2. Open the campaign's **Settings** tab.
3. Under **Who should see the popup**, click **Add new rule**.
4. In the rule picker, choose **Source** — *Google, Facebook, direct, custom*. The picker notes that *Rules are combined with AND*, so every rule you add narrows the audience further.
5. Set **Traffic from** to one of:

- **Google organic**
- **Google Ads**
- **Facebook**
- **Direct**
- **Custom…**
6. Choosing **Custom…** gives you an operator and a value box with the placeholder *utm_source value*. As the panel explains: *Choosing "Custom" lets you match a specific utm_source value with an operator (equals, contains, starts with, …).* The operators are **equals**, **not equals**, **contains**, **not contains**, **starts with** and **ends with**.
7. Click **Save changes** in the save bar at the bottom. Until you do, the bar reminds you: *You have unsaved changes.*

You can add several source conditions to the same rule — one campaign can greet visitors from `spring_sale` and `spring_sale_retargeting` alike.

The rule's own help text sums it up: *Use this field when you want to show the popup to visitors coming from a given source.
*

---

## A worked example: match the ad copy

You are running a Facebook campaign for a spring sale, tagged `?utm_source=fb_spring`.

1. Build a popup whose headline repeats the ad's promise — *"Your 20% spring discount is waiting"*.
2. Add a **Source** rule, **Traffic from → Custom…**, operator **equals**, value `fb_spring`.
3. Publish.

Visitors who arrive from that ad see the matching message; everyone else sees nothing, or another campaign of yours.

---

## You can ask for it instead of clicking

Every campaign has a settings assistant beside the panel. Describe the change in plain language — *"only show to visitors coming from Google Ads"* — and the panel on the left updates itself. The assistant's own intro says so: *Editing settings — describe what to change in chat. The panel on the left updates automatically.*

---

## What else you can target on

**Source** is one of the rules available here. The full list in the picker:

| Rule | What it targets |
| --- | --- |
| Current page / URL | Show or hide on specific pages |
| Visited URL | Pages the visitor opened earlier |
| Country | Geographic targeting (from the visitor's IP address) |
| Returning / New | New vs returning visitors |
| Spent on pages | Seconds spent on the current page |
| Spent on site | Seconds spent browsing |
| Number of visited pages | Number of pages this session |
| Source | Google, Facebook, direct, custom |
| Cookie segmentation | Target by browser cookie values |
| Engaged with OptiMonk campaigns | React to how visitors met your other campaigns |
| Cart rules | Cart value, item count, products (Shopify & co.) |
| Klaviyo lists and segments | Klaviyo list/segment membership |

**Cookie segmentation** is the closest thing to a free-form visitor attribute: if your site already writes what you care about into a cookie, you can target on its presence or its value with the same operator set.

---

## Attributes that are not available here

The classic OptiMonk admin has an *Other Visitor Attributes* rule with a longer list. In this app, the following are **not** available as targeting rules:

- OS type
- Browser type
- Browser language
- Timezone
- First landing
- Current month
- First visit date
- Campaign last seen
- Custom attribute (any JavaScript custom visitor property)

Two notes, so nothing surprises you:

**Existing rules are never destroyed.** If a campaign already carries one of these rules — because it was set up in the classic admin — it stays on the campaign and keeps working. It simply shows up as a card you cannot edit here: *Legacy OptiMonk rule — preserved on save, edit it in the OptiMonk admin.* Opening the card repeats the point: *"{type}" is a legacy OptiMonk rule this editor can't modify. It stays untouched when you save — manage it in the OptiMonk admin.* Everything else on the page saves normally around it.

**To add or change one, use the classic admin.** Open it from the campaigns list with **Open classic admin**, set the rule there, and come back — the rule will be waiting on the campaign, preserved.

The same applies to **Custom Attributes** (formerly Custom Variables): the builder cannot create or edit them. Set them up in the classic admin.

---

## You can still *analyse* by these attributes

Not being able to target on an attribute doesn't mean you're blind to it. **Reports** breaks your traffic down by twelve dimensions, several of which are exactly the ones missing above:

**Device Types · New vs Returning Visitors · Landing Pages · Visited Pages · Countries · Traffic Sources · Referring Sites · Browsers · Operating Systems · UTM Sources · UTM Campaigns · Browser Languages**

So you can answer *"do Safari visitors convert worse?"* or *"which UTM campaign brings the best signups?"* in Reports, even when you can't turn the answer into a targeting rule.
