> AffiliateOS Help Center. Index of every article for AI tools: https://www.affiliateos.ai/help/llms.txt

# Website campaigns

Advertiser campaigns · For advertisers · Updated 30 October 2026
Web version: https://www.affiliateos.ai/help/campaigns/website-campaigns

A website campaign sends people to a public HTTPS page on your site instead of an app store. On every tap we add `afos_click_id` to that page's URL. Your site keeps it, and your server sends it back with each event you pay for, such as a sign-up.

## Before you start

- A public HTTPS landing page. Addresses with a user name or password in them, IP addresses and local, internal or single-word hosts are refused.
- A server that can store the click ID with the visitor or their account, and send events to our API.

## Steps

### Campaigns, then New campaign, then a Website product

Under **Product**, create one with **Product type** set to **Website** and its **Website URL**. A product is either a mobile app or a website, never both. The URL becomes the default for each new campaign.

### Set the campaign name and landing URL

Under **Campaign**, the **Campaign name (shown to users)** is the offer title people see in publishers' apps. **Campaign landing URL** is the exact page people land on; each campaign keeps its own approved copy of it.

### Add events and choose the primary result

Add each event you'll pay for, such as `signup_completed`. Then pick the **Primary result**: a once-per-user event that your reporting counts as Results, result rate and cost per result.

### Capture afos_click_id on the landing page

Read the parameter when the page loads and hand it to your server, which keeps it in a first-party cookie or session and saves it on the account at sign-up.

```js
const params = new URLSearchParams(location.search);
const clickId = params.get("afos_click_id");
if (clickId) {
  fetch("/api/attribution/affiliateos", {
    method: "POST",
    keepalive: true,
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ clickId }),
  });
}
```

Example. The browser only passes the click ID along; it never holds your API key.

### Send events from your server

Send the stored ID as `clickId`, with `"platform": "web"`, and `"test": true` until each event is **Verified**:

```bash
curl -X POST "https://affiliateos.xyz/v1/advertiser/events" \
  -H "Authorization: Bearer $AFOS_ADVERTISER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "clickId": "clk_7Q2f81",
    "advertiserUserId": "u_48213",
    "eventKey": "signup_completed",
    "eventId": "signup_u_48213",
    "timestamp": "2026-10-30T19:06:00.000Z",
    "appId": "<your product ID>",
    "campaignId": "<your campaign ID>",
    "platform": "web",
    "test": true
  }'
```

Example values. Reuse the same `eventId` when you retry, so one sign-up is never counted twice.

### Check it worked

Every required event shows **Verified**, and the checklist ticks **Confirm the Website landing URL** and **Choose the primary result**. Then [submit for approval](https://www.affiliateos.ai/help/campaigns/submit-for-approval-go-live).

> **No click ID, no charge.** A live event without a stored `afos_click_id` is logged as `missing_attribution` and never charged. Visitors who arrive any other way don't count.

## Once it's live

The campaign page shows **Clicks**, **Primary results**, **Spend** and **Balance left**.

To change the landing page later, type the new URL under **Campaign landing URL** and choose **Save landing URL**. It shows as the proposed URL, pending review, while the **Approved URL** keeps serving. Then choose **Submit changes for review**. The new page serves once we approve it.

## If an analytics tool already sees your events

Pick **Your attribution tool posts to AffiliateOS** under **Connect your website**, and fill in each event's **Name in your attribution tool (optional)** so the names match. The tool, or your server, still has to send the stored `afos_click_id` as `clickId` with every paid event.

Every field and response status is in the [advertiser events reference](https://www.affiliateos.ai/help/developers#advertiser-events).
