Affilyflow Docs
Affilyflow developer docs
Technical reference for tracking sales with Affilyflow and the affiliate API – for developers and AI coding assistants.
What's here
The English docs cover the technical reference. Store setup guides for each platform are in Danish.
- track.js – the tracking script: attributes, JavaScript API, cookies and consent.
- Sale line – report the sale from the order confirmation page with one line of HTML.
- Google Analytics – read the purchase from the site's GA4 event, no field names needed.
- Conversion API – report sales from your own server.
- Status codes – what each response means and what to do.
- REST API and MCP – for affiliates and their AI assistants.
How it fits together
- An affiliate shares a link. The click goes through Affilyflow and lands on the store with a click id (
?afid=c_…). - The store's tracking remembers the click (the Shopify app's Web Pixel, the WooCommerce plugin or
track.js). - The customer buys. The sale is reported with order number and amount and linked to the click.
- The commission is locked on the click and approved once the approval period has passed, unless the store rejects the sale.
Reference
- track.jsComplete reference for the tracking script – attributes, JavaScript API, what is stored in the browser, consent and errors.
- The sale lineReport the sale with a single line of HTML on the receipt page – no JavaScript, and Danish amounts are parsed correctly.
- Google AnalyticsLet track.js read the purchase from Google Analytics 4 with data-sale="ga4" – no code on the receipt page.
- Conversion APIThe endpoint that receives sales – for server-side and custom integrations, with parameters, responses and limits.
- Status codesWhat each status from the conversion endpoint means – and what to do about it.
Affiliates
For AI agents
Every page is also available as Markdown (add .md to the address), and the whole documentation is in one file for your coding assistant.