# Measure a campaign

> Find the campaign that brought the people who sign up, buy or activate. Group the conversions by first touch in Events, or break a funnel down by first campaign.

> **In short**
>
> - Sequential reads the campaign of an event from the `utm_` parameters of the event's own page address. A sign-up page usually has no such parameters, so sign-ups grouped by **Campaign name** show "(not set)".
> - To find the campaign that brought each person who signed up, use **First touch (person)** → **First campaign name** in Events. Each count is people.
> - **Sessions** fields count sessions by their own campaign. **First touch (account)** fields count accounts.
> - In Funnels, set **Break down by**, or click **Break down by first campaign**.
> - By default, these views leave out your team: the people that your project marks as its team. To count them, untick **Leave out your team**. See [Your team in the counts](#your-team-in-the-counts).

## Why "Campaign name" shows (not set) for sign-ups

Each event gets its campaign values from its own page address. For example:

1. A person opens `https://example.com/?utm_campaign=spring`. The page view has the campaign name `spring`.
2. The person goes to `/signup` and creates an account. The sign-up event has the page address `/signup`, with no `utm_campaign`.

In Events, with the filter **Event Name** = your sign-up event and **grouped by** **Campaign name**, the sign-up is in "(not set)". An event that your server sends has no page address, so its campaign fields are always "(not set)".

To credit the sign-up to the campaign of the first visit, use a **First touch (person)** field. See [Credit each person to a first touch](#credit-each-person-to-a-first-touch).

## Choose what to count

In Events, the **grouped by** menu has four groups with campaign fields:

| Group | Fields | Each count is | The value comes from |
|---|---|---|---|
| **Campaign & release** | **Campaign source**, **Campaign medium**, **Campaign name** and more | events | the page address of each event |
| **Sessions** | **First campaign source in session**, **Last campaign source in session**, and the same for medium and name | sessions | the events of that session only |
| **First touch (person)** | **First campaign source**, **First campaign medium**, **First campaign name**, **Last campaign before converting**, **First visit source**, **Landing page** | people | the person's visits before the conversion |
| **First touch (account)** | the same six fields, each with **Account** at the start | accounts | the visits of all the people of the account, before the account's conversion |

- A campaign field in **Sessions** shows only for a campaign key that your project has. See [Events explorer](/docs/events-explorer).
- A session field counts the campaign of the session itself. If a person clicks an ad, leaves, and signs up on a later visit, the sign-up session does not have the campaign. Use a **First touch (person)** field for that.
- **then by** must count the same thing: a **First touch (person)** field pairs only with another **First touch (person)** field, and a **First touch (account)** field only with another account field.

## Credit each person to a first touch

1. Open **Events**.
2. Set the dates. The conversions in these dates count.
3. Click **+ condition**, pick the Field **Event Name** and pick your sign-up event, or another conversion event.
4. In **grouped by**, choose a field under **First touch (person)**, for example **First campaign name**.
5. Click **Run**.

The table shows one row for each value. The count column reads **People**.

Tip: run the same question again, grouped by **Last campaign before converting**. If the two tables are different, some people came from more than one campaign.

**How Sequential credits a person:**

- The filter and the dates select the conversions. Each person counts one time, at the first matching event in the dates.
- Then Sequential reads the person's visits before that event, in all the data that it keeps for the project. This includes the days before the dates that you set. A visit after the conversion never gets the credit.
- An event that your server sends with the user id counts as a conversion. It is never a touch, because it has no page address.
- The visits that a person made before `identify()` count, because Sequential links them to the person. See [Identify users](/docs/identify-users) and [Limits](#limits).

**The fields:**

| Field | The value |
|---|---|
| **First campaign source**, **First campaign medium**, **First campaign name** | The earliest value in the person's visits that is not empty and not (withheld). (withheld) shows only when the person has no other value. |
| **Last campaign before converting** | The latest campaign name before the conversion, with the same rules. |
| **First visit source** | The site that the first visit of the person came from, for example `google.com`. |
| **Landing page** | The first page that the person viewed, as a route template, for example `/blog/:id`. |

**Special rows:**

| The row reads | It counts |
|---|---|
| (none) | People who have visits before the conversion, but no value for this field. |
| (no browser visit) | People who have no visit before the conversion: only events from your server. |
| Direct / internal | **First visit source** only: a first visit with no referrer, or from a page of the same site. Another domain of your project counts as a different site. |
| (withheld) | Campaign values that Sequential removed when it stored the event. See [What Sequential keeps from page URLs](/docs/url-policy). |

A person row has no **% of total**, no **Filter to this** and no **Watch sessions**. A table shows at most 1,000 groups.

### The lines above the table

- "Credited to each person's first touch since 15 Oct 2026." The date is the first day of data that Sequential still keeps for the project. It shows in the date format of your browser. A touch before that day is not in the data.
- "Earlier visits may be missing from the data, so some first touches can be later visits." This line shows when Sequential cannot confirm that it still keeps every day of the project's data. See [Data retention and deletion](/docs/retention-and-deletion).
- The team line, for example "Leaves out your team: 3 people." See [Your team in the counts](#your-team-in-the-counts).

### Your team in the counts

A view grouped by a **First touch (person)** or **First touch (account)** field, and a funnel with a breakdown, have the switch **Leave out your team**. It is on when the view opens.

- **On:** the counts leave out the people that your project marks as its team. The line under the table says how many, for example "Leaves out your team: 3 people." or "Leaves out your team. No one from your team is in these results."
- **Off:** the counts include them, for example "Includes your team: 3 people."
- **Accounts:** with the switch on, the events of your team do not count, as conversions or as touches. An account that only your team converted is not in the table.
- **No team marked:** the line reads "No one is marked as your team, so everyone is counted." To mark your team, an owner or admin sets `data.internal` in the project settings through the API. See [Analytics from an agent](/docs/limits#analytics-from-an-agent).
- **Team not readable:** if Sequential cannot read who your team is, a view with the switch on shows "Sequential could not read who is marked as your team right now. Try again shortly, or include your team." Untick **Leave out your team**, or try again shortly.
- The switch is not saved: it is on again when you open the view again.

## Credit each account

Use the same steps, and choose a field under **First touch (account)**, for example **Account first campaign name**. The count column reads **Accounts**.

- Only events that carry an account id count as conversions. Each account counts one time, at its first matching event in the dates. An event that your server sends with the account id counts.
- The people of an account are the people whose browser events carry the account id. Sequential reads all of their visits before the account's conversion. The earliest touch of any of them gets the credit.
- An account that only your server sends has no people. It is in "(no browser visit)".
- The table also shows "Only events that carry an account id count."

See [Users and accounts](/docs/users-and-accounts) for how to send an account id.

## Break a funnel down by campaign

1. Open **Funnels** and add the steps, for example a page view, your sign-up event and your activation event.
2. In **Break down by**, choose a field. Or click **Break down by first campaign**: this chooses **First campaign name**.
3. Optional: in **Conversion window (days)**, type a whole number from 1 to 90.
4. Click **Run**.

**Break down by** has **No breakdown** and the six **First touch (person)** fields. With a breakdown, the bar also has **Leave out your team**. See [Your team in the counts](#your-team-in-the-counts). When a result shows, a change of **Break down by** or of the window runs the funnel again.

The table under the funnel has the name of the field, for example **By first campaign name**:

- One row for each group: the 20 largest groups by the people at step 1, then (other) for the rest. So the groups add up to the funnel.
- A column for each step, with the people and the rate from step 1, and the column **Step 1 to N**. It shows — when no person did step 1.
- Each person is in one group: the touch at or before the person's step-1 event.
- The table shows counts only. It has no list of people.
- The lines under the table say what the count credits, for example "People, credited to their first touch since 15 Oct 2026.", and the same gap line and team line as in Events.

**Conversion window (days)**

- A later step counts only when the person does it within this number of days after step 1. All steps must also be in the dates.
- Empty means no window.
- **Who dropped** uses the same window, so its people match the funnel.
- A value that is not a whole number from 1 to 90 shows "Conversion window: a whole number of days from 1 to 90, or empty for none." The funnel does not run.

If Sequential cannot read the breakdown, the page shows "Couldn't read the breakdown. The funnel above is not affected."

## Limits

- **The data that Sequential keeps.** A first touch comes only from the data that Sequential still keeps. When old data is deleted, a later visit can look like the first. The line "Earlier visits may be missing from the data…" warns about this. See [Data retention and deletion](/docs/retention-and-deletion).
- **A new sign-up.** Sequential links the earlier anonymous visits to a person a few minutes after `identify()`. Until then, a new person can be in another row, for example (none) or (no browser visit).
- **A shared device.** When two people sign in on the same browser, the visits before the first sign-in stay with the first person.
- **`reset()`.** It starts a new anonymous id. The visits after `reset()` are not linked to the person from before.
- **Your server's user id.** A server event never links a visitor to a person. Only `identify()` in the browser does. So use the same user id on your server as in `identify()`. See [Backend SDK](/docs/backend-sdk).
- **Another origin.** The browser SDK keeps one anonymous id for each origin. For example, `example.com` and `app.example.com` are two origins. A visit on one origin links to the person only if `identify()` also runs on that origin.
- **Mobile apps.** App events have no page address, so they have no campaign values. Install attribution is not available.

## Tag your links

An example link: `https://example.com/pricing?utm_source=reddit&utm_medium=cpc&utm_campaign=spring_launch`

One pattern that works:

- `utm_source`: where the click came from, for example `reddit`, `google` or `newsletter`.
- `utm_medium`: the type of traffic, for example `cpc`, `email` or `social`.
- `utm_campaign`: a short name for the campaign, for example `spring_launch`.

Rules:

- Use the parameter names in lower case: `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content`. Sequential does not read `UTM_SOURCE`.
- Values keep their case: `Reddit` and `reddit` are two rows. Use one rule for all your links, for example lower case only.
- Put the parameters before a `#`. A `utm_` parameter after `#` is not read.
- Sequential keeps the first 128 characters of a value.

See [Campaign values](/docs/events-explorer#campaign-values) for how Sequential reads them.

## Agents

An agent with the scope `analytics:read` can ask the same questions:

- `get_breakdown` takes `user:first:<key>`, `user:first_visit:<key>` and `user:last_before:<key>`, with the key `$utm_source`, `$utm_medium`, `$utm_campaign` or `$page`. Each count is people.
- `get_breakdown` also takes `session:first:<key>` and `session:last:<key>` with the same four keys. Each count is sessions. `session:first:$page` is the entry page.
- `funnel_analysis` takes `breakdown` with the `user:` fields, and `conversion_window_days` from 1 to 90.
- The conversions are in the agent's window: at most the last 30 days, ending now. The first touch comes from all the data that Sequential keeps.
- In the filters of these tools, an agent can also test a person's first touch: the first or the first-visit value of `$utm_source`, `$utm_medium`, `$utm_campaign` or `$page`, with text operators only. The filters in the app cannot.
- `exclude_internal: true` leaves out the people that the project marks as internal, as **Leave out your team** does in the app.
- Agents cannot use the **First touch (account)** fields, **First visit source**, the release pair of **Sessions**, `$utm_term` or `$utm_content`. They cannot filter by a session value.

See [Analytics from an agent](/docs/limits#analytics-from-an-agent).

## Related

- [Events explorer](/docs/events-explorer)
- [Funnels](/docs/funnels)
- [Identify users](/docs/identify-users)
- [Users and accounts](/docs/users-and-accounts)
- [What Sequential keeps from page URLs](/docs/url-policy)
- [Data retention and deletion](/docs/retention-and-deletion)
