Product
Publishers
Advertisers
Networks
Help
Pause animations
Browse help topics
How-to Advertiser

Website campaigns

Updated

View as Markdown

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.

See also: Setup without an SDK

On this page

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

    JavaScript
    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.

  5. Send events from your server

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

    Shell
    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.

  6. 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.

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.

Support

Still stuck? Write to us.

One address for every question: hello@affiliateos.ai. Put the details from this list in your first message so we can find the click or conversion without asking you for them again.

Put these in your message

  1. 01The email you sign in with
  2. 02Your role: publisher, advertiser or network
  3. 03The offer ID
  4. 04The click ID or action_id
  5. 05The time it happened, with your time zone
  6. 06What you expected to happen

Looking for a reward in an app? Ask that app's support. It credits your reward, so only it can see your balance.

Search help