Skip to main content
Track when traffic from a partner’s affiliate link converts. Introw attributes every conversion to a signed, server-side click record, so attribution cannot be forged or double-counted. You report conversions with the Record an affiliate conversion endpoint - either server-to-server or directly from the browser with the affiliate.js snippet.

How attribution works

  1. A partner shares an Introw affiliate link (/r/{code}). Introw logs a server-side click and redirects the visitor to your site with an opaque irw_id query param.
  2. The affiliate.js snippet on your site reads irw_id, stores it in a first-party, last-click _introw_aff cookie (90-day window), and strips it from the URL.
  3. When the visitor converts (signup, purchase, …), you call the conversions endpoint with the cookie value as clickId.
  4. Introw verifies the signed click token, deduplicates, and creates a campaign form submission from the conversion payload.
Because every conversion is anchored to a real click and deduplicated, partners cannot inflate their numbers and you cannot accidentally double-count.

Forgiving responses

The browser snippet must never surface errors on your page, so the endpoint is intentionally lenient:

Choose an integration

Option A - Client-side (browser)

Add the snippet once in the <head> of every page. It stores the attribution cookie, auto-tracks HubSpot form submissions, and exposes window.introw.affiliate.track(...). The organisation publishable key is safe to expose and the same for every campaign - the visitor’s click cookie decides which campaign a conversion belongs to, so one snippet covers all your campaigns. Find your key on any campaign’s Install tab.
Call track when a visitor converts. You don’t need to pass a key - the snippet’s organisation key is used automatically, and the visitor’s click cookie decides which campaign the conversion belongs to:
Each campaign also has its own publishable key (on its Install tab), but you rarely need it. Passing it scopes the call to that one campaign as a guard: if the visitor’s click belongs to a different campaign, the conversion is ignored rather than recorded. It does not relabel the conversion - the click cookie is always the source of truth for attribution.
Browser conversions are accepted only from the campaign’s allowed origins (configure them on the campaign’s Install tab). Leave the allowlist empty to accept any origin.

HubSpot forms

Once the snippet is installed, HubSpot form submissions are tracked automatically - no embed-code changes and no track call. The snippet listens for both classic (hsFormCallback postMessage) and HubSpot Forms v4 (hs-form-event:*) submit events, reads the submitted email, and records the conversion against the visitor’s click cookie.

Option B - Server-to-server

Recommended when conversions happen on your backend. Use a secret API key with the affiliate:write scope and send the click id captured from the _introw_aff cookie:

Conversion properties

Send arbitrary metadata in properties (for example plan, deal value, or order id). Each key is mapped onto a campaign form field via the campaign’s field mapping; unmapped keys are stored alongside the submission.

Authentication

The server-to-server path uses a secret API key with the affiliate:write scope - see Authentication. The browser path authenticates with the campaign publishable key plus the Origin allowlist instead of a secret key.

Migrating from another tool

If you’re moving from a previous affiliate tool (for example PartnerStack), Introw can recreate your program as campaigns and generate an affiliate link for every partner. So links already in the wild keep working, each old link is mapped to its new Introw link. Add a redirect rule on your side that forwards old links to the backwards-compatible redirect endpoint (pass the original URL as the u query parameter). Introw resolves the mapping and redirects to the new Introw link, which records the click and forwards to the destination as usual. No API key is required - the lookup is keyed by the original URL.

API reference

Record an affiliate conversion

POST /api/v1/affiliate/conversions

Redirect a legacy (PartnerStack) link

GET /api/v1/affiliate/legacy-redirect