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:
- Test click recorded with the time,
- Test purchase recorded with the order number and amount,
- 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.
A test purchase earns no commission or fee and doesn't count in your figures. 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.
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.
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 |
|---|---|
| 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 | The order was above the program's amount cap (DKK 50,000 by default) and wasn't recorded. |
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.
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.
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, open a support case under Support in the dashboard, or write to info@affilyflow.com.
Missing something?
Write to us – we answer quickly, and the page gets fixed.