Testing and troubleshooting

Prove that tracking works with a test purchase – and find the cause when a sale doesn't come through.

View as Markdown

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

  1. 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.
  2. Place an order in that tab – in the same browser.
  3. 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.
  4. 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.

MessageDo this
We're missing your store's addressSave the website in the install step.
We could not reach the pageCheck that the page is live and that the address is correct.
We didn't find the tracking codeFollow the install step again, save your changes and test again. See the platform's guide too.
Your website rejects our automatic checkNot 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 saysCause and fix
A purchase came in without a click IDThe 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 knowOpen the test link again and buy in the same browser.
The click was too oldThe 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 throughWithout 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 saleRemove the lead code and use the sale code.
The currency couldn't be convertedOpen a support case under Support.
We haven't seen anything for 10 minutesCheck 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:

StatusWhat it means
okThe sale is recorded and attributed to an affiliate (or your test link).
duplicateThe same order came in again and wasn't counted twice. Normal, for example on a reloaded order confirmation.
unknownThe click ID doesn't exist – wrong, deleted or never recorded.
expiredThe click was older than the program's cookie period.
invalid_valueThe amount was negative or unreadable. Points to a fault in the sale code.
zero_valueThe order was DKK 0.
store_mismatchThe click belongs to a different store from the sale. Check that data-store is your own store ID.
value_too_highThe order was above the program's amount cap (DKK 50,000 by default) and wasn't recorded.
unsupported_currencyThe currency couldn't be converted.
program_inactiveThe program was switched off when the sale came in.
stale_lead_triggerA lead code on a program that pays per sale. Remove the old lead code.
blockedThe affiliate is blocked, so the sale earned no commission.
self_referralThe buyer has the same email address as the affiliate. Recorded as rejected – it costs you nothing.
errorRecording 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 saysCause
Affilyflow: sporingskoden (track.js) mangler paa sidenThe 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 numberThe sale line's order number is empty or a placeholder.
data-affilyflow-total must be the amountThe sale line's amount is empty or 0.
the purchase event has no amountThe 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 saysDo this
The plugin is installed, but the store is not connectedPaste the connect code on the Affilyflow page in WordPress, and press Connect.
The connect code was not recognisedPaste your current code again.
The plugin's connection is outdatedUpdate the plugin under Plugins, and paste the connect code again.
The route does not existUpdate the plugin to 1.6 or newer, and check that it is activated.
The site is set to privateGo 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 requestCheck that the site is public and that no security plugin blocks the REST API.
The plugin couldn't reach AffilyflowYour host blocks outgoing requests – that hits real sales too. Ask your host to allow outgoing HTTPS to Affilyflow.
The store URL redirectsCorrect 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:

StepWhat it means
Clicks from affiliatesClicks recorded on our server.
Reached a page with the scriptThe customer landed on a page where the script (or the WooCommerce plugin) ran and reported the click.
Click was storedThe click was stored in the browser – or by your own server.
Became a saleThe 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.

Contact support