---
title: Run a site's Meta ads
description: 'A site whose owner connected a Meta ad account can run ads on Facebook
  and Instagram from here: read every campaign and its numbers, make campaigns, ad
  sets and ads, and switch them on and off.'
sidebar:
  order: 7
---

A site whose owner connected a Meta ad account can run ads on Facebook and
Instagram from here: read every campaign and its numbers, make campaigns,
ad sets and ads, and switch them on and off. This guide is how the pieces
fit, what to ask the owner before anything spends, and what the numbers
mean. Topic `ads` is the exact vocabulary: objectives, goals, buttons,
placements, statuses.

The ads commands run inside `bash`, like every other site command. Reading
needs nothing more than reading the site. Making or changing anything needs
the connection to have been allowed to manage ads; a connection that was
not is told so, and the owner connects the agent again to allow it.

## 1. Campaign, ad set, ad

An ad account holds three kinds of thing, each inside the one above:

- **A campaign** says what the ads are for: its `objective`, such as
  `OUTCOME_TRAFFIC` for visits to the site or `OUTCOME_LEADS` for somebody's
  details. The objective is fixed once the campaign is made. A campaign may
  carry a budget that Meta shares across its ad sets, or leave the budget to
  each of them (`budget_kind: none`).
- **An ad set** says who sees the ads, where, when and for how much: the
  places it reaches, the ages, the placements, its budget and its schedule,
  and what Meta shows the ads to get more of (`optimization_goal`). The
  objective decides which destinations and goals an ad set may name.
- **An ad** is what people see: a picture, its words, the page it sends them
  to and its button.

`list_campaigns` gives the whole tree with what each may spend and whether
it runs. `get_campaign`, `get_ad_set` and `get_ad` give one object with its
`fields`, which are exactly what `update_campaign`, `update_ad_set` and
`update_ad` take. Send only the fields you change; the rest stay as they are.

```text
list_campaigns --range 7
get_ad_set 120200000000101
update_ad_set 120200000000101 --age_max 55
```

## 2. Ask before anything spends

An ad spends the owner's money. Before you make one, ask the owner, and
write down their answers:

- **What it is for.** Visits to a page, messages, sign-ups, sales. That is
  the objective, and it cannot be changed later.
- **Where.** The cities, regions or countries, and how far around a city.
- **How much.** A budget a day, or one for the whole run. Amounts are in the
  ad account's currency, which `list_campaigns` names, typed as a person
  types them: `"15"` or `"15.50"`.
- **When.** The first day, and the last when there is one. Times are in the
  ad account's time zone: `2026-11-10T09:00`.

**Never raise a budget, and never switch anything on, unless the owner asked
for that in so many words.** "Set it up" is not "start it". When you are
done, say what you made, what it would spend a day, and that it is paused,
and let them decide.

## 3. Paused first, and the owner's ceiling

- **Everything is made paused.** `create_campaign`, `create_ad_set` and
  `create_ad` refuse any other `status`. Nothing spends until
  `set_ads_status` switches it on.
- **The owner sets what an agent may spend a day** on the site's Ads screen.
  `list_campaigns` says it as `agent_daily_ceiling`. Until it is set, any
  budget you send is refused, and so is switching anything on. Once it is
  set, a budget above it is refused, a budget for the whole run counted per
  day of the run.
- **Switching on is one step, held to the same ceiling.**
  `set_ads_status campaign <id> ACTIVE` is refused when what the campaign
  would spend a day is above it, and the site's members are told each time
  an agent switches something on.
- **A campaign runs only where its ad set and ad are on too.** A new campaign
  with a new ad set and ad needs all three switched on, each its own step.
- **Meta reviews every new ad**, and every changed one, before it runs:
  usually within a day. `get_ad` says `PENDING_REVIEW` until then, and
  `DISAPPROVED` with Meta's reason when it refuses.
- **`PAUSED` stops spending at once and can be undone. `DELETED` cannot.**

## 4. A page of the site and a picture from its Disk

- **Where an ad sends people** is `link`: a page of the site by its path, as
  `get_site` lists them (`/courses`), or any `https` address. A path becomes
  the site's own address, its custom domain where it has one.
- **The picture** is one the ad account already has: `get_ad` names the
  picture an ad uses as `image_hash`, which another ad may take, or one of
  the site's Disk pictures, by the key `list_files` gives it
  (`--picture_key q3Xk9mP2vL7nR4tY8wB1cD6f`), once the site's owner has put
  it in an ad on the Ads screen. A Disk picture goes to the ad account when
  the owner picks it there, never from an agent's call: a key of one the
  account has not got is refused, saying so.
- **`url_tags`** are added to the link, so the site's own analytics can tell
  visits from the ad apart: `utm_source=meta&utm_campaign=autumn`.
- **New words, a new picture, link or button make a new creative** on the
  same ad, which Meta reviews again.

```text
create_ad --json '{"name": "Evening class", "ad_set_id": "120200000000101",
  "image_hash": "0d4e2b8c5f", "message": "Evenings at the wheel.",
  "headline": "Pottery for beginners", "link": "/courses", "call_to_action": "SIGN_UP"}'
```

## 5. Places, and the EU's payer and beneficiary

- **`search_ad_locations Kyiv`** finds places as an ad set's `locations`
  takes them. Give each back whole, and add `radius` in kilometres around a
  city (Meta takes 17 to 80).
- **`estimate_ad_audience`** says how many people a month the targeting
  would reach before anything is made. Too few, and Meta struggles to spend
  the budget; widen the places or the ages.
- **A place in the EU, Iceland, Liechtenstein or Norway** makes the ad set say
  who pays for the ads (`dsa_payor`) and who they are for
  (`dsa_beneficiary`), which the law asks of every ad shown there. Both
  default to what the ad account says; ask the owner when it says nothing.
- **An objective that counts actions on the site** (a sale, a sign-up) needs
  the site's Meta Pixel. `pixel_id` defaults to the one the site has; a site
  without one has to add it on the Site screen of the Vizitka app first.

## 6. What the numbers mean

Every read takes `range`: 7, 14, 28 or 90 days, ending yesterday. Meta's
numbers are a few hours behind, and a read gives the same numbers for
fifteen minutes, so asking twice in a row gives the same answer.

- **`spend`**: what was spent, in the account's currency.
- **`impressions`**: how many times the ads were shown. **`reach`**: how
  many different people saw them. **`frequency`**: impressions per person.
- **`clicks`**: every click on the ad. **`link_clicks`**: clicks through to
  the link, which is what a visit to the site starts with.
- **`ctr`**: clicks as a percentage of impressions. **`cpc`**: spend per
  click. **`cpm`**: spend per thousand impressions.
- **`results`** and **`cost_per_result`**: on an ad set, the thing its goal
  counts (a landing page view, a lead, a purchase) and what each cost. On a
  campaign and its ads, the thing its objective counts: impressions for
  Awareness, landing page views for Traffic, engagements for Engagement,
  leads for Leads and purchases for Sales. For impressions,
  `cost_per_result` is the cost of a thousand, like `cpm`, not of one.

`get_ads_insights` gives the same numbers a day at a time, for the objects
one level down, and split by `age`, `gender`, `country` or placement. A new
campaign spends unevenly for its first few days while Meta learns who
responds, so judge a change after a week, not a day.

## 7. When Meta says no

- **Meta's own sentence comes back as the refusal**, such as a budget below
  its minimum or a goal the objective does not allow. Change what it names
  and send it again.
- **A refusal before Meta is asked** names the field in the editor's words,
  and nothing was sent.
- **Meta sometimes asks for a pause** when an ad account is asked too much at
  once. The refusal says how long; wait that long before asking again.
- **A site whose owner's Meta permission lapsed** is told so. Only the owner
  can connect Meta again, on the Ads screen.
