Skip to content

Tracking

Installing the tracking script

Add the lightweight SDK so referral visits are recognised on your site.

What the script does

The SDK runs asynchronously and never blocks your page. It:

  • detects the click identifier (aff_cid) added by tracking links, or a ?ref=CODE referral parameter,
  • stores the identifier in a first-party cookie named _aff_cid on your domain,
  • optionally reports page views and custom events,
  • reports a heartbeat so you can see in diagnostics that it is installed.

It does not create commissions. Only verified conversions from your server or a signed integration do.

Install

Copy the snippet from Websites → Integration. It contains your publishable key, which is safe to expose:

<script async src="https://YOUR-APP-DOMAIN/sdk/v1.js" data-key="pk_live_..."></script>

Place it in the <head> of every page, or use your platform's "custom code" setting (WordPress, Wix, Webflow, Shopify theme).

Consent

If your site requires consent before setting marketing cookies, add data-consent="required" and call AffTrack.consent(true) from your consent banner once the visitor agrees. Until then no identifier is stored.

Reading the click ID at checkout

Read the _aff_cid cookie on your server (or call AffTrack.getClickId() in the browser and pass it in a hidden form field) and include it when you report the conversion.

Check the installation

Open Websites in your dashboard. After a page with the script loads, the status shows SDK detected with the time and page it was last seen.