Personal discount codes
A discount code you give to one specific affiliate earns commission – even when the customer never clicked a link.
A personal discount code is a code you tie to one specific affiliate. When a customer uses the code, the affiliate earns commission on the sale – even without a click. It catches the sales a link can't: a customer who declined cookies, or who saw the recommendation on their phone and bought on a computer. How to use the codes with creators is covered in the guide to influencer marketing.
Personal and general codes
| Code | Earns commission |
|---|---|
| Personal – for one specific affiliate | Yes, even without a click. |
| General – for all affiliates | No, not on its own. It's the click on the affiliate's link that earns the commission. |
A general code is shared together with the link. It makes the purchase cheaper for the customer, but it doesn't tell you which affiliate the customer came from.
Create a personal code
- Create the code in your webshop as an ordinary discount code.
- Open Program in the dashboard and find the Discount codes panel further down the page. If it says "Discount codes are turned off", turn on Allow discount codes in the program settings first.
- Enter the code and the discount, choose the affiliate under Who is the code for? and press Create code.
The Who is the code for? field can only be used once at least one affiliate has joined your program – until then it says "No affiliates have joined yet", and the code becomes a code for everyone.
The affiliate sees the code on the program page under Din personlige rabatkode (Your personal discount code) and can share it. Upper and lower case and spaces make no difference when the code is compared.
A code may use A–Z, 0–9, hyphen and underscore and must be 3–40 characters. Avoid special letters such as Æ, Ø and Å – many webshops cannot match them.
The list shows how many sales each personal code has brought in without a click (Sales via code). A code can be paused and reactivated later – a paused code earns no commission and is not shown to the affiliate. If you delete the code, it is gone for good.
Click or code – who gets the sale?
- A valid click always wins. If the customer clicked an affiliate's link within the program's cookie period, the click decides the sale – even if the customer uses another affiliate's personal code. Last click wins.
- Without a valid click, the code decides. If the customer has no click, or the click has expired, the affiliate the code belongs to gets the sale.
- Other networks. In the tracking script and the WooCommerce plugin, another network's most recent click also beats a personal code when Last click wins is on (it is by default), so you don't pay two networks for the same sale. See Last click wins.
- The commission on a sale through a code is the program's current rate. There is no click to lock the rate on.
All the usual safeguards apply: self-referrals are caught, a blocked affiliate earns no commission, the same order number only counts once, and the first sales from a new account are flagged for review and never approved automatically.
Privacy
An order without a click is only sent to Affilyflow when it was placed with a personal code. The script, the WooCommerce plugin and the snippets for server-side tracking fetch a list of one-way fingerprints (SHA-256) of your personal codes and compare the customer's code with that list inside your store before anything is sent. Orders with a general code, or with no code at all, never leave your store.
The snippets also only send the personal codes with a sale that has a click – a general code never leaves your server. The list is fetched at most every 5 minutes. If it can't be fetched, the snippets answer retry for an order without a click, so it is sent again later instead of being lost.
The code needs no storage in the browser. That's why it also works for a customer who has declined marketing cookies.
How the code reaches us
The code has to be included when the sale is reported. How depends on the platform:
| Platform | How the code is included |
|---|---|
| Custom-built store – the sale line | Add data-affilyflow-coupon="KODE" to the line. Separate several codes with commas. |
| Custom-built store – Google Analytics | Automatically: the coupon field in the GA4 purchase event is read. |
| Custom-built store – from your server | Pass the customer's codes to the call. The snippets only send those on your list, in the coupons field. See Server-side tracking. |
| Google Tag Manager | The Discount code field in the purchase tag, for example GA4's coupon. See Google Tag Manager. |
| JavaScript | affilyflow.conversion({ ..., coupon: 'KODE' }). See track.js. |
| WooCommerce | Automatically from plugin version 1.11.0. |
| Shoporama | Automatically: the sale code in thanks.html sends the order's discount code along. |
| Magento 2 with the module | Automatically: the module only sends orders without a click when they have a personal code. See Magento 2. |
| Magento 2 without the module, PrestaShop and Shopware 6 | Through the Google Analytics route: the coupon field in the GA4 purchase event is read when the platform sends it. |
| Stripe | One-off payments and subscriptions, when the Stripe coupon has the same ID as the code. See below. |
| Smartweb, DanDomain and Webflow | Only if the order confirmation template can write the code into data-affilyflow-coupon on the sale line. |
| The Shopify app | Automatically from app version 11-27, once you have approved the app's access to orders. The code is read from the order on Shopify's server. See Shopify. |
<div hidden data-affilyflow-order="1008" data-affilyflow-total="540.00" data-affilyflow-coupon="ANNA10"></div>Without a click, the script only sends a sale that has an order number, so a reloaded order confirmation can never count twice.
Stripe
Stripe only sends us the coupon's ID – not the promotion code the customer typed. So give the Stripe coupon the same ID as the personal code in Affilyflow. This works for one-off payments and subscriptions: on a subscription, the first payment becomes the sale and renewals earn commission as with a click. If you create subscriptions without Checkout, the code has to go in the subscription's metadata. See Stripe.
What you and the affiliate see
- The sale details on your side show Attributed via: Personal discount code ANNA10 – no click.
- The affiliate sees the code on the program page and on the sale.
- Tracking coverage in Setup counts the sales that came through personal discount codes without a click.
Missing something?
Write to us – we answer quickly, and the page gets fixed.