Affilyflow Docs
Everything you need to set up Affilyflow
Tracking setup for stores, technical reference for developers and an API for affiliates – in one place, written from how the product actually works.
Where do you want to start?
I run a webshop
Set up tracking, test a purchase and make your program visible to affiliates.
I am an affiliate
Links with sub-IDs, measured pages, program rules and payouts.
I am a developer
The tracking script, the sale line, server-side tracking and the API for affiliates and AI.
Choose your platform
Every guide follows the same three steps as Setup in the dashboard: choose a platform, install, test tracking.
Which route fits your store?
Tracking has two jobs: remember the affiliate's click when the customer lands, and report the sale with its order number and amount. How that happens depends on where you sell.
| You sell on | How the sale is tracked | Guide |
|---|---|---|
| Shopify | The app creates the pixel and your account – no code. | Shopify |
| WooCommerce | Our plugin tracks from your own server and reports refunds. | WooCommerce |
| Smartweb, HostedShop, DanDomain, Shoporama | The tracking code on every page plus a sale code on the order confirmation – the platform fills in the order number and amount. | Smartweb, DanDomain Classic, Shoporama |
| Magento 2, PrestaShop, Shopware 6 | The tracking code on every page; the sale is read from the platform's own Google Analytics 4 module. | Magento 2, PrestaShop, Shopware 6 |
| Webflow | The tracking code in the site's custom code plus one line on the order confirmation that reads the order number and amount from the page. | Webflow |
| Custom-built store (e.g. Laravel or PHP) | Scan your site: if it already sends the purchase to Google Analytics, it takes one line in total. Otherwise, one line on the order confirmation. | Custom-built store |
| Stripe Checkout and Payment Links | A webhook reports one-off purchases, subscriptions and refunds. | Stripe |
If you have a developer, server-side tracking keeps working on iPhone and with ad blockers too.
How it fits together
- An affiliate shares a link. The click goes through Affilyflow and lands on the store with a click ID in the address (
?afid=c_…). - The store's tracking remembers the click – the Shopify pixel, the WooCommerce plugin or
track.js. - The customer buys. The sale is reported to Affilyflow with the 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.
Read the whole journey in How tracking works.
Test before you go live
Every store has a test link under Program → Setup, in the Test tracking step. A test purchase through it earns no commission and no fee, and the page shows the click, the order number and the amount straight away – including how the amount was calculated. See Testing and troubleshooting.
For developers and affiliates
- Developers: track.js, the sale line, the Google Analytics route, the conversion API and status codes.
- Affiliates: links and sub-IDs, the REST API and MCP for AI assistants.
Everything in the docs
Get started3 pages
- How tracking worksHow a click on an affiliate link becomes a sale with locked commission – and what happens along the way.
- Getting started as a storeFrom a new account to a program affiliates can find – account, price, tracking and a test purchase.
- Getting started as an affiliateFrom account to first payout – create an account, add your sites, find programs, create links and follow your results.
Stores17 pages
- ShopifyTracking with the Affilyflow app and a Web Pixel – no code and no changes to your theme.
- WooCommerceInstall our free plugin and paste in your connect code – clicks and sales are tracked from your own server.
- Smartweb and HostedShopTracking on Smartweb, HostedShop and the new Dandomain Webshop – a script in the design and a sale code in the affiliate field.
- DanDomain ClassicTracking on the older DanDomain engine – the tracking code in the site's code field and the sale code on Bestil step 4 (order step 4).
- ShoporamaThe tracking code in an HTML field and the sale code in the theme's thanks.html – with the amount excluding VAT and shipping.
- Magento 2Tracking on Magento 2 and Adobe Commerce via Google Analytics 4 – the tracking code in HTML Head and Magento's own Google Analytics module. No module from us yet.
- WebflowThe tracking code in the site's Custom code and one line on the Order Confirmation page – no template variables needed.
- PrestaShopTracking on PrestaShop via Google Analytics 4 – the tracking code in the theme and the official ps_googleanalytics module. No module from us yet.
- Shopware 6Tracking on Shopware 6 via Google Analytics 4 – the tracking code in the theme and Google Analytics on the sales channel. The standard confirmation page is read even without Google Analytics. No app from us yet.
- Custom-built storeSet up tracking on a store that was built for you, e.g. in Laravel or PHP – without knowing any field names.
- Server-side trackingLet your own server store the affiliate click and report the sale – so tracking holds up on iPhone, in Safari and with ad blockers.
- StripeTrack sales from Stripe Checkout and Payment Links with a webhook – one-off purchases, subscriptions and refunds.
- Testing and troubleshootingProve that tracking works with a test purchase – and find the cause when a sale doesn't come through.
- Consent and cookiesWhat tracking stores in the customer's browser, for how long – and how the script can wait for consent to marketing.
- Personal discount codesA discount code you give to one specific affiliate earns commission – even when the customer never clicked a link.
- Approval and refundsThe approval period, how to reject a sale, and when a refund is corrected automatically.
- Products and feedHow your products get into affiliates' product search – from your shop or from a Google Shopping or CSV feed.
Reference5 pages
- 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.
Affiliates6 pages
- Links and sub-IDsHow to create tracking links, deep links to specific products, sub-IDs and HTML that shows the exact page every click came from.
- Page trackingSee exactly which page on your site each click came from – automatically with the HTML snippet, with placement.js or through your own redirect.
- Program rulesApproval period, channels, paid search, coupon sites, what happens if a rule is broken – and how rule changes are announced.
- PayoutsAutomatic payout on the first banking day of the month from DKK 100 – bank details, personal details, self-billing, VAT and what happens with refunds.
- REST APIThe affiliate API under /api/v1 – keys, limits, every endpoint with parameters and responses, pagination and error codes.
- MCP serverConnect Claude, ChatGPT, Claude Code or Cursor to your Affilyflow account – setup, sign-in, the 23 tools, prompts and limits.
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.