RefCampaign tracks visits through a browser SDK on your site. This page covers the install, the verification, and what to check when tracking doesn't work. You'll find it under **Settings → SDK setup**.

## Install and verify

<Steps>
  <Step>
    ### Install the SDK

    Pick your platform (Next.js App Router, Next.js Pages Router, no-code script tag, or custom JavaScript) and add the snippet to your site.
  </Step>

  <Step>
    ### Launch a test session

    Click **Launch a test session** and open your site. RefCampaign waits for the SDK to load and capture a session.
  </Step>
</Steps>

The status moves through three states:

* **Waiting for SDK** — RefCampaign hasn't seen the SDK load yet.
* **Waiting for a detected session** — the SDK loaded; now it waits for a captured session from your site.
* **Installation verified** — both checks passed.

## When tracking doesn't work

Run **Check site configuration** to scan the page. Common findings:

* **SDK missing from public HTML** — the snippet isn't deployed on the page you tested. Confirm it ships in production.
* **CSP blocks the SDK** — your Content Security Policy rejects the script. Add the RefCampaign source to your `script-src` directive.
* **CSP blocks capture** — the SDK loads but can't send data. Add the source to your `connect-src` directive.

## Wire Stripe attribution

A second, optional step passes the RefCampaign session to Stripe so server-side payments get credited to the right affiliate. Connect Stripe first (see [connecting Stripe](/docs/merchant/connecting-stripe)), then follow the **Wire Stripe** step. The first real conversion confirms end-to-end tracking.
