# Find which page earns the most

> See the commission of each page of your site. Track clicks with a link that carries a click ID, then read GET /v1/stats with group_by=page.

Page: https://www.afffast.com/guides/which-page-earns-most

Click tracking

# Find which page earns the most

Your networks show sales for each program, not for each page. One API call shows the commission of each page of your site.

[Start your trial](https://app.afffast.com/signup)

## What it looks like

Commission by page · November

Sample data

| Page | Conv. | Commission |
| --- | --- | --- |
| /best-running-shoes | 41 | €612.30 |
| /boots-review | 27 | €388.10 |
| /travel-insurance-guide | 12 | €254.00 |
| /coupon/nordic-outdoor | 19 | €96.75 |

1. Each row is one page. The value is the `page` of the click that led to the sale.
2. Conv. is the number of sales that came from clicks on that page.
3. Commission is in the currency of your workspace. The bar shows the share of the best page.

## Why this matters

A few pages of a site earn most of the money. When you do not know which pages, you write new articles by guess and you leave the best old pages alone.

With the commission of each page, you know where to write next. You also know which old page to update first.

## Why most tools cannot tell you

A network sees the sale. It does not see your page. It knows only the tracking link that the buyer used. When many pages use one link, the network cannot tell them apart.

A web analytics tool sees the page. It does not see the commission, because the sale happens on the site of the advertiser.

To join the two, a tool must put its own click ID in the link and read the same ID back with the sale. Most reports do not do this, so you join the numbers by hand.

## How AffFast does it

AffFast has its own redirector. Your link goes through it. The redirector saves the click with its page and puts a click ID in the SubID slot of the network.

When the network reports the sale with that SubID, the sync joins the sale to the click. Then `GET /v1/stats?group_by=page` gives the commission of each page. A sale with no click is in the group `unattributed`, so the totals stay correct.

## How to do it

1. Connect your network. Check that it has a SubID slot: read `capabilities.subid_slots` with `GET /v1/networks/{id}`.
2. Make a link for a program with `POST /v1/links`. Set `site` to the site that shows the link.
3. Put the short URL in your page. When the browser sends no referrer, add `?page=<address of the page>` to the link.
4. Wait for the sync. The next sync joins the new sales to their clicks.
5. Read the commission of each page with `GET /v1/stats` and `group_by=page`.

Make a link and read the pages

Make a link

```
curl -X POST https://api.afffast.com/v1/links \
  -H "Authorization: Bearer $AFFFAST_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "program": "prog_...",
    "destination": "https://shop.example/products/boots",
    "site": "site_..."
  }'
```

Commission of each page

```
curl -g "https://api.afffast.com/v1/stats?date[gte]=2026-11-01&date[lte]=2026-11-30&group_by=page" \
  -H "Authorization: Bearer $AFFFAST_API_KEY"
```

## Learn more

In the docs

- [Links and click tracking](https://docs.afffast.com/docs/links)
- [Stats and forecast](https://docs.afffast.com/docs/stats)
- [Connect a network](https://docs.afffast.com/docs/connect)
- [API reference](https://docs.afffast.com/reference)

Features that this guide uses

- [Click tracking](https://www.afffast.com/features/click-tracking)
- [Reports and dashboard](https://www.afffast.com/features/reports)

## Related guides

- [Network syncOne report for all your affiliate networks](https://www.afffast.com/guides/one-report-all-networks)
- [MCPAsk your affiliate data in Claude](https://www.afffast.com/guides/ask-affiliate-data-in-claude)
- [Postbacks and webhooksSee a sale in seconds with postbacks](https://www.afffast.com/guides/sales-in-seconds-postbacks)

## Start your free trial

[See pricing](https://www.afffast.com/pricing)

Free for 14 days. No card needed. Cancel any time.
