Testing and troubleshooting
Prove that tracking works with a test purchase – and find the cause when a sale doesn't come through.
Click counts on their own prove nothing: clicks are recorded on our server, even with no code at all on your side. It's the sale that needs testing. The quickest way is the live test in step 3, Test tracking, under Program → Setup.
The live test
- Press Open test link under 2. A test purchase in step 3. The test link is a real affiliate link to your shop and opens in a new tab.
- Place an order in that tab – in the same browser.
- Stay on Setup. The page checks every 4 seconds for up to 10 minutes and shows the whole chain for the test click:
- Test click recorded with the time,
- The script saw the click on your site – the script (or the WooCommerce plugin) reported that the test tab landed with the click,
- The click is stored in the browser – or stored after a yes to cookies when the script waits for consent,
- Test purchase recorded with the order number and amount,
- the exact cause if a step doesn't arrive (see the table below), and a warning if the purchase was rejected or the order number was missing.
- Answer whether the amount is the value of the goods after discount, excluding VAT and shipping. If you answer no and enter the correct amount, the live test tells you whether the amount includes VAT, includes shipping, is too low or is wrong in some other way.
If your own server reports the sale (server-side tracking), there is no script that sees the click along the way – the live test shows the click and then the purchase once your server reports it. If you wait for consent, the script is required, and the chain shows as above.
A test purchase earns no commission or fee and doesn't count in your figures. Until you have your first real click or sale, Overview, Results → Statistics and Clicks & sales show the test click and test purchase marked Test data, so you can see there too that it arrived. Cancel the order in your shop afterwards.
The exceptions:
- Shopify uses the test link in the Affilyflow app.
- Stripe: the test purchase can be made in Stripe's test mode with a test card after the test link – see Stripe.
- WooCommerce: step 3 is called Confirm. The self-test (below) confirms the plugin, and a test purchase is optional.
A free test purchase
The test purchase shouldn't cost you anything. Under the live test, How to make the test purchase free shows what fits your platform. Pick what your shop has:
- A discount code that makes the order almost free – e.g. 99 %, not 100 %. An order of 0 has no amount we can check and is often not reported at all.
- A payment method without a card, if your checkout has one – e.g. bank transfer, invoice or pay on pickup. The order is placed, but no money is taken.
- Your payment provider's test mode, if it has one – then you pay with a test card. Only turn it on for the few minutes the test takes: while it's on, real customers can't pay.
Worth knowing per platform:
| Platform | How |
|---|---|
| WooCommerce | Cash on delivery reports the order right away. With bank transfer the order stays on hold – set it to Processing under WooCommerce → Orders, and the plugin reports it. |
| Smartweb, DanDomain Classic and Shoporama | The sale code reports the purchase on the order confirmation page, so a payment method without a card works right away. |
| Magento 2 with the module | The module reports the order once the invoice is paid. Use for example Check / Money order and create the invoice under Sales → Orders → Invoice – the sale arrives within a couple of minutes (Magento cron must be running). |
| Magento 2 without the module, PrestaShop and Shopware 6 | Google Analytics reports the purchase on the order confirmation page – also with a payment method without a card, e.g. Check / Money order or Bank Transfer in Magento, bank wire in PrestaShop or prepayment in Shopware. |
| Stripe | Stripe's test mode with the test card 4242 4242 4242 4242 – the webhook must also be created in test mode. See Stripe. |
| Your own server (API) | Your server reports the order once it is paid. With a payment method without a card, the order has to be marked as paid in your system before it is reported. |
| Shopify | The test link in the Affilyflow app – the test sale is free. |
Cancel the order in your shop afterwards.
The server route: "test": true only proves the connection
A test sale with "test": true from your server has no click. It proves that the key and the connection work – Setup then says Connected – waiting for a sale with a click – but not that the click is stored and sent along. Tracking runs once your server has reported a purchase with a click. The easiest way is a test purchase via the test link, reported by your server as a normal order (without "test": true).
The tracking code on the front page
The first part of Test tracking, 1. The tracking code on the front page, is checked automatically: we fetch your front page, and Check the front page again fetches it once more. This proves the script – not the sale. The test purchase (above) is always visible in the same step, so you don't have to wait for the front-page check.
| Message | Do this |
|---|---|
| We're missing your store's address | Save the website in the install step. |
| We could not reach the page | Check that the page is live and that the address is correct. |
| We didn't find the tracking code | Follow the install step again, save your changes and test again. See the platform's guide too. |
| Your website rejects our automatic check | Not a fault in your setup (it's typically bot protection). Confirm with a test purchase instead. |
On Shoporama the front page can be served from the cache for up to 4 hours – give it a moment.
The server route doesn't check the front page – unless you wait for consent. Then the script on every page is required, because your server must not store the click before the customer says yes. Setup shows The script on every page and warns when it isn't on the front page.
Once the script has been found, we check the front page again every 6 hours. If the tracking code disappears, for example after a theme update, we send an email when it goes from working to down.
When the live test shows an error
| The live test says | Cause and fix |
|---|---|
| The script didn't report the click from your site | The script is missing on the page the test link opens – or an ad blocker stops it in the test browser. Put the script in <head> on every page and try without the blocker. |
| The click is waiting for consent | The script waits for a yes to marketing cookies. Say yes in the cookie banner in the test tab. |
| Marketing cookies were declined | The click must not be stored. Open the test link again in a new private window and say yes. |
| The script saw the click but couldn't store it | The page runs in a frame, for example, or the browser blocks storage. Try a normal tab without extensions. |
| The click is stored, but the order confirmation didn't report the purchase | The sale code (or Google Analytics' purchase) is missing on the order confirmation page, or the script isn't there. Follow the install step again. |
| The plugin hasn't reported the order | The WooCommerce plugin reports an order once its status is Processing or Completed. A bank transfer stays on hold until you change the status. |
| Your server hasn't reported the purchase | Check that the click (the af_click cookie) is saved on the order at checkout, that the order is paid, that the API key is in AFFILYFLOW_API_KEY, and see in your log what we replied. |
| Your server reported a test sale with "test": true | That only proves the connection. Make the purchase via the test link and report it as a normal order. |
| A purchase came in without a click ID | The purchase was made in a different browser from the test link. Buy in the same browser – ideally in the tab the test link opened. |
| The purchase came with a click ID we don't know | Open the test link again and buy in the same browser. |
| The click was too old | The click is older than the program's cookie period. Open the test link again and buy right after. |
| The amount didn't come through (0) | The amount field is empty or wrong. |
| The order number didn't come through | Without it, a reloaded order confirmation can count as a new sale. Check the field with the order's number. |
| The lead code is on the page, but the program pays per sale | Remove the lead code and use the sale code. |
| The currency couldn't be converted | Open a support case under Support. |
| We haven't seen anything for 10 minutes | Check that the code is in place as the guide shows, and press Start over. |
Status codes
Every sale we receive gets a status – including the ones that don't become a sale. These are the ones a store typically meets:
| Status | What it means |
|---|---|
ok | The sale is recorded and attributed to an affiliate (or your test link). |
duplicate | The same order came in again and wasn't counted twice. Normal, for example on a reloaded order confirmation. |
unknown | The click ID doesn't exist – wrong, deleted or never recorded. |
expired | The click was older than the program's cookie period. |
invalid_value | The amount was negative or unreadable. Points to a fault in the sale code. |
zero_value | The order was DKK 0. |
store_mismatch | The click belongs to a different store from the sale. Check that data-store is your own store ID. |
value_too_high | No longer used: since December 2026 a sale above the amount cap (DKK 50,000 by default) is held for review instead of being rejected. |
unsupported_currency | The currency couldn't be converted. |
program_inactive | The program was switched off when the sale came in. |
stale_lead_trigger | A lead code on a program that pays per sale. Remove the old lead code. |
blocked | The affiliate is blocked, so the sale earned no commission. |
self_referral | The buyer has the same email address as the affiliate. Recorded as rejected – it costs you nothing. |
error | Recording failed. Write to info@affilyflow.com. |
The full list is in Status codes.
Errors in the browser console
The sale codes write to the console (the developer tools) when they can't report a sale. Open the console on the order confirmation page after a test purchase:
| The console says | Cause |
|---|---|
Affilyflow: sporingskoden (track.js) mangler paa siden | The script isn't on the order confirmation page. The platform sale codes (Smartweb, DanDomain, Shoporama) wait 10 seconds for it and then write this error. |
data-affilyflow-order must be the order number | The sale line's order number is empty or a placeholder. |
data-affilyflow-total must be the amount | The sale line's amount is empty or 0. |
the purchase event has no amount | The Google Analytics purchase event had no amount. |
salgskoden skal i … | The sale code is in the wrong place, where there is no order. The message says where it belongs. |
The two Danish messages come from the platform sale codes and say the same as the table: "the tracking code (track.js) is missing on the page" and "the sale code belongs in …".
WooCommerce: the self-test
Press Test the plugin connection in step 3, Confirm, under Setup. The self-test asks the plugin to call us and shows the plugin version. It proves that the plugin can reach us – only a real sale shows that orders are reported.
| The self-test says | Do this |
|---|---|
| The plugin is installed, but the store is not connected | Paste the connect code on the Affilyflow page in WordPress, and press Connect. |
| The connect code was not recognised | Paste your current code again. |
| The plugin's connection is outdated | Update the plugin under Plugins, and paste the connect code again. |
| The route does not exist | Update the plugin to 1.6 or newer, and check that it is activated. |
| The site is set to private | Go to Settings → Reading in wp-admin and make the site public. As long as it's private, a customer can't buy through an affiliate link either. |
| WordPress rejected the request | Check that the site is public and that no security plugin blocks the REST API. |
| The plugin couldn't reach Affilyflow | Your host blocks outgoing requests – that hits real sales too. Ask your host to allow outgoing HTTPS to Affilyflow. |
| The store URL redirects | Correct the address under Settings, and test again. |
From version 1.9.0 the plugin checks in once a day, and the plugin's own page in WordPress shows when it last reached us.
Magento: the self-test
Press Test the module connection in step 3 under Setup. The self-test asks the Magento module to call us and shows the module version. It proves that your server can reach us – only a paid invoice shows that orders are reported.
| The self-test says | Do this |
|---|---|
| The module is installed, but the store is not connected | Paste the connect code under Stores → Configuration → Affilyflow and press Save Config. If the store has several websites, check the scope. |
| The connect code was not recognised | Paste your current code again. |
| The module couldn't reach Affilyflow | The server blocks outgoing requests – that hits real sales too. Allow outgoing HTTPS to app.affilyflow.com. |
| We couldn't find the module | Check that the module is enabled (bin/magento module:status Affilyflow_Tracking), that setup:upgrade has run and that the cache is flushed. |
| The store URL redirects | Correct the address under Settings, and test again. |
The status panel under Stores → Configuration → Affilyflow also shows whether Magento cron runs and when the module last reached us. Without cron, sales stay in the queue.
When tracking stops reporting in
We keep an eye on tracking checking in ourselves. If the WooCommerce plugin, the Stripe webhook or your server hasn't checked in for about a week while affiliates are sending visitors, the dashboard says No tracking signal for 7 days, and the program is hidden from new affiliates. Affiliates who have already joined keep their links, clicks and sales and can see that the program is temporarily inactive.
A quiet week isn't enough: we only hide the program when the silence can't be explained – for example when the plugin's daily check-in is missing, or when your clicks usually lead to sales and no longer do.
The program becomes visible again on the next sign of life: a sale, the plugin's daily check-in, a self-test or an event from Stripe or your server. Check that the plugin is active and connected (the self-test above), that the webhook still exists in Stripe, or that your server still reports sales – and make a test purchase.
With the script, we check the front page instead – see The tracking code on the front page.
Tracking coverage
Once tracking is running, Tracking coverage under Setup shows what happens to the clicks from your affiliates over the last 30 days:
| Step | What it means |
|---|---|
| Clicks from affiliates | Clicks recorded on our server. |
| Reached a page with the script | The customer landed on a page where the script (or the WooCommerce plugin) ran and reported the click. |
| Click was stored | The click was stored in the browser – or by your own server. |
| Became a sale | The click led to a recorded sale. |
The figures are measured from your first measured landing, so older clicks from before measuring began don't look like lost clicks. Below the figures it says what can recover the rest:
- Clicks that never reached a page with the script. Usually the script is missing on a landing page, or an ad blocker stopped it. Let your server store the click, or check that the script is on every page.
- Clicks from iPhone and Safari. Here the browser deletes a click stored by the script after about 7 days. Let your server store the click so it lasts the full period.
- Customers without consent. Customers who declined marketing cookies or didn't respond. The click may not be stored without consent – but a personal discount code earns commission without cookies.
- Sales through personal discount codes. Sales that came through a personal code without a click.
Coverage requires the script or the plugin to report the landing: track.js always does, the WooCommerce plugin from version 1.11.0. See Consent and cookies.
Landing pages that lose clicks
Below the figures are the landing pages where clicks get lost – pages with at least 20 clicks where under 80 % of the clicks reached the script, with the most lost clicks first. The path is shown without parameters, and the front page is /. When every landing page reaches the script, it says so instead.
When a page never or rarely reaches the script, the cause is almost always one of two things:
- The script is missing on the page. Typically a campaign page, a landing page tool or a subpage with its own template. Add the script to the page – ideally in the template every page uses.
- The page redirects without
?afid. A redirect (for example from an old address, a language choice or a cookie wall) sends the customer on but drops?afid=c_…from the address. Make the redirect keep the parameters, or let your server store the click before it redirects.
Open the page with a test link from Setup, and check that the address still has ?afid= after every redirect.
Sales we could not record
Under Results you see the purchases from the last 30 days that came with a click or a personal discount code from an affiliate but were not recorded. They are grouped by reason with a count, the latest time and the latest purchases (the order number shortened, and the amount). Select a reason to see what it means and what you can do. Each order counts once, even when it was reported several times, and an order that was recorded on a later attempt is not listed.
- Can be fixed – something in the setup: a wrong
data-store, a currency without a rate, an amount sent in cents, a paused program or an old lead code. - The rules worked – for example a click older than the cookie period, or another network that had the customer's latest click, so you don't pay two networks for the same sale.
The codes and what they mean are under Status codes and in the reference. Nothing about the customer is stored.
Filtered-out clicks
Below the figures for source, devices and countries you see how many clicks were filtered out in the period, and why: known bots, crawler clicks, cloud servers, repeat clicks, scripts, embedded clicks and affiliates clicking their own links. They are not counted and earn no commission.
Still no sale?
- Is the script on every page – including the landing page and the order confirmation?
- Is the sale code in the right place, and in only one place?
- Was the test purchase made in the same browser as the test link?
- Is the script waiting for consent (
data-consent="required")? Then you need to accept marketing cookies during the test – see Consent and cookies.
If you're stuck, call us on +45 28 25 81 61 (weekdays, Danish time), open a support case under Support in the dashboard, or write to info@affilyflow.com. Under Setup you can also leave your number and press Call me, and we will call you.
Missing something?
Write to us – we answer quickly, and the page gets fixed.