Merchant user guide
How to use this system and report clicks and conversions quickly. For technical endpoints see API reference.
Step 1: Get your Merchant Slug (integration key)
Use the Merchant Slug for integration; no separate API key. How to get it:
- At registration — On Register, enter your website URL (e.g.
https://yoursite.com). The system derives a slug (e.g.yoursite). After signup you are redirected to/domain/yoursite/dashboard; the segment yoursite is your Merchant Slug. - After login — The browser URL is
/domain/<merchantSlug>/dashboard. The middle segment is your Slug. - In settings — Open Merchant Settings (e.g.
/domain/<slug>/settings) to see the read-only Slug field.
Step 2: Add the tracking script (recommended)
Add the script on every page (or at least landing and checkout) to record visits with ref=CODE and set the cookie for conversion attribution.
Script URL:
https://afflixo.com/sdk.js?merchant=<merchantSlug>
Example: https://afflixo.com/sdk.js?merchant=reviewgrow
<!-- Replace YOUR_MERCHANT_SLUG with your merchant slug from the dashboard --> <script src="https://afflixo.com/sdk.js?merchant=YOUR_MERCHANT_SLUG" async ></script>
The script reads ref= from the URL, calls the track click API and sets the cookie, and exposes window.Affiliate.getAffiliateCode() and window.Affiliate.trackConversion(...) so you can report conversions on the order confirmation page. Try the Integration demo to see a minimal working example.
Step 3: Report conversions (choose one)
Report one conversion per completed order so affiliates get commission. Either:
- Front-end — On the order success page, call
trackConversiononly when the visitor came from an affiliate (to avoid 400 for non-affiliate orders).trackConversionaccepts:- orderId (required), amount (required, number), currency (optional, default
"USD") - affiliateCode (optional — from cookie if omitted), transactionId (optional), email (optional), productName (optional)
if (window.Affiliate.getAffiliateCode()) { window.Affiliate.trackConversion({ orderId: 'YOUR_ORDER_ID', // required amount: 99, // required (number) currency: 'USD', // optional, default 'USD' affiliateCode: undefined, // optional, uses cookie if omitted transactionId: undefined, // optional email: undefined, // optional productName: undefined // optional }) .then(function() { /* success */ }) .catch(function(err) { console.warn('Conversion track failed', err); }); }Without thegetAffiliateCode()check, non-affiliate orders would send a request that returns 400 and the promise rejects. - orderId (required), amount (required, number), currency (optional, default
- Back-end — Your server calls
POST /api/<merchantSlug>/track/conversionwhen the order completes, withorderId,amount,currency?(default USD), andaffiliateCode(from the front end via cookie orgetAffiliateCode()). Duplicate orderIds are idempotent and do not double-count commission.
Request/response format: API reference — Report conversion.
Click tracking is handled by the script automatically: it only sends a click when the URL has ref= or when the referrer is from a different origin (external site). Same-site navigation does not trigger a click, so you do not need to add any check before the script runs.
Summary
- Get your Merchant Slug (register / login / settings).
- Add sdk.js?merchant=<slug> site-wide (or on key pages) to record clicks and set the cookie.
- Report one conversion per order using front-end trackConversion (only when
getAffiliateCode()is set) or back-end POST /track/conversion.
Referral link format: your site URL + ?ref=CODE, e.g. https://yoursite.com/?ref=AF123456. Affiliates get their code and link from the Affiliate dashboard.
Referrer domains (clean links)
Affiliates can optionally add a list of referrer domains (e.g. their blog or site) in My links. When your site uses the tracking script and a visitor arrives without ref= in the URL but came from one of those domains, the script sends the referrer to the backend; if it matches an affiliate’s approved domain, the visit is attributed to that affiliate. That allows clean links like https://yoursite.com instead of https://yoursite.com/?ref=AF123456. Attribution by referrer depends on the browser sending the referrer; if it is stripped (e.g. Referrer-Policy or privacy tools), the ref= link remains the most reliable. New domains may be auto-approved or require merchant approval (see platform admin config and merchant Referrer domains in the dashboard).
Merchant dashboard
After login, go to /domain/<merchantSlug>/dashboard to:
- Affiliates — View, approve, enable or disable affiliates.
- Referrer domains — When platform auto-approve is off, approve or reject affiliates’ referrer domains for clean-link attribution.
- Conversions — View conversions and commission status (pending / approved / paid).
- Payouts — Process payout requests; actual payment is done outside the system.
- Settings — Configure commission, attribution, website URL, cookie duration, etc.
More APIs
To fetch affiliate list, single affiliate earnings, or payouts from your own system, use the Merchant API in the API reference (login required for JWT).