> AI agents: this is one page of nextanalytica's docs. The full index for agents: https://nextanalytica.app/llms.txt

# ROAS by ad

> How your agent shows spend, orders, revenue and ROAS for each Meta and Google ad, and the one setting Meta needs so a visit names its ad.

Updated: 2026-11-30

ROAS by ad tells you which ad inside a campaign paid back and which didn't. Your agent sets each ad's spend against the orders and revenue [attribution](/docs/learn/attribution) credits to it. Google needs no setup. Meta needs one line on every ad.

## What can your agent answer?

Ask for ROAS by ad, or by ad set (Meta) or ad group (Google). For each Meta and Google ad, your agent reads:

| Number | What it is |
| --- | --- |
| Spend | What the ad cost in the period |
| Orders and revenue | What our attribution credits to the ad |
| ROAS | Revenue divided by spend |
| Cost per order | Spend divided by orders |
| Platform purchases and ROAS | What Meta or Google claims for the same days, beside ours |
| Days with spend | How long the ad ran, so you can judge the sample |

Revenue that never reached an ad stays in its campaign, in a row of its own:

- **`<campaign>, ad unknown`** is revenue from visits we couldn't tie to an ad.
- **`<campaign>, no ads`** is spend no ad carries, such as Performance Max and other campaigns without ads.

Neither row is a bad ad. Campaign and account totals don't change because of them. Your agent also sees, for each campaign with ads, the share of its revenue that reached an ad: a campaign at 30% is missing the parameter, not running bad ads.

## How do you set up Meta?

A Meta visit names its ad through its `utm_content`, which Meta fills in when someone clicks. Meta keeps URL parameters on each ad, so paste the line on every ad:

1. Open **Ads Manager** and select all the ads in the account.
2. Open the bulk edit for **URL parameters**.
3. Paste this line, then publish the change.

```text
utm_source=facebook&utm_medium=paid&utm_campaign={{campaign.name}}&utm_content=ad_{{ad.id}}
```

The bulk edit covers the ads you have now. Add the line to each new ad too, or duplicate an ad that has it. Your agent lists the ones still missing it.

> **Note:** publishing new URL parameters on an active ad sends it into Meta's processing, which can take up to an hour and pauses its spend. On some occasions it also resets the ad's social proof and sends it back into the learning phase. Make the bulk edit at a quiet hour, or add the line when you create new ads.

Keep the `ad_` before `{{ad.id}}`. Our tag and edge remove any run of 13 to 19 digits as a long number, and a bare ad id is one. With `ad_` in front, the id arrives whole.

Without the parameter, a visit whose `utm_content` is exactly the name of one ad in that account still reaches that ad. Two ads with the same name reach neither, so use the line above.

> **Note:** the line sets `utm_content` to `ad_` and the ad's id. Other reports that read `utm_content`, such as Google Analytics, now show that in place of what you had there.

## How do you find the Meta ads still missing it?

Ask your agent. It lists the ads that delivered in the last 7 days without `utm_content=ad_{{ad.id}}` in their link, by campaign, with the line to paste (it reads them from `get_context`). The list is at most one sync old. Their orders stay at campaign level until you add the parameter.

The list reads each ad's **URL parameters** field. An ad with the line written into its website URL instead, or a dynamic or Advantage+ creative that leaves the field empty, shows as missing. Put the line in the URL parameters field.

## What does Google need?

Nothing. Google adds a click id (`gclid`) to the link, and your agent resolves it to the ad that was clicked.

- Only clicks from visits to your site are kept. Other people's clicks on your ads are never stored.
- Click ids resolve up to **90 days** back. An older visit stays at campaign level.
- Performance Max and other campaigns without ads stay at campaign level, as `<campaign>, no ads`.
- App campaigns don't give click ids, so their visits stay at campaign level.

## Does it change my ad account?

No. We only read reports. We never pause an ad, change a budget or write a URL parameter. Your agent tells you what to change, and you do it.

## How do you judge an ad with few orders?

Read the ad's orders and days with spend beside its ROAS. Under a few orders, your agent says "too early" and doesn't call the ad good or bad. Compare an ad's ROAS with its ad account's and with your break-even, not with another ad that has 2 orders.

## What can you ask your agent?

> Which of my Meta ads paid back last month, and which should I turn off? Show the orders each one has.

## Next steps

- [Attribution models](/docs/learn/attribution)
- [UTM tags](/docs/learn/utm-tags)
- [Shopify](/docs/sources/shopify)

Canonical address: https://nextanalytica.app/docs/learn/ad-roas
