Skip to main content
A campaign groups links that belong to the same piece of work, so you can ask how the campaign performed rather than adding up links by hand.
The response carries the campaign id, which everything else needs.

The usual shape

1

Create the campaign

The container.
2

Create channels within it

Email, social, paid — however you want to compare. See Channels.
3

Add links to channels

A link can be in more than one.
4

Read the numbers

get_campaign_kpis for headlines, the analytics endpoints for detail.

Reading performance

Total clicks, top country, top referrer, best-performing link, and the change against the preceding period. For breakdowns, the analytics endpoints take the same filters:

Listing

get_campaigns accepts the analytics filters too, so you can list campaigns with their performance in one call rather than looping.

Updating and deleting

Campaigns have an ordinary single delete, unlike links:
Deleting a campaign does not delete its links. They keep working and keep their own analytics; they are simply no longer grouped.

Campaigns, tags and UTMs

Three ways of organising that are easy to confuse: They are complementary. A link is typically in one campaign, carries a few tags, and has UTM parameters on its destination.