How to audit your affiliate tracking: where partner sales go missing, and how to test each leak
Affiliate tracking can pass every test you ran at launch and still lose a share of partner sales: to Safari, a redirect, a consent banner, a checkout field or a failed webhook. A step-by-step audit from click to payment, with how to test each step, what a leak looks like and how to fix it.
Most affiliate programs test their tracking once, at launch. Someone clicks a partner link, signs up, pays, and the partner is credited. Then the site changes. A redirect is added, a consent banner goes up, checkout moves to a new subdomain, a webhook endpoint is rebuilt. The test still passes on the founder’s laptop in Chrome, and a slice of real customers stops being credited.
That’s the hard part of affiliate tracking: it rarely fails completely. It fails for one browser, one landing page or one checkout path, and the sales that do arrive make the reports look normal. Partners notice before you do, when a sale they know they sent is missing.
This guide is a tracking audit you can run every few months, or after any change to your site, signup or checkout. It follows a partner click from the link to the payment, and for each step gives a test, what a leak looks like, and the fix. It applies whatever tool you use. Where OpenPartner has a specific check or setting, it’s noted.
Before you start
You’ll need:
- A partner link you can click as a test, ideally one that doesn’t pay a real partner.
- Two devices (a phone and a laptop), and a private window in each browser you test.
- Your billing data for the last 30 days: the paid invoices or orders from Stripe, PayPal, Paddle or your own billing system.
- The tracking tool’s view of the same period: clicks, signups linked to a partner, and credited conversions.
If you use OpenPartner, Admin → Tracking health has most of the second half on one page. Tracking health explains each section.
1. The click id reaches your page
Click the partner link and look at the address bar when your page has loaded. The click id
should still be there (in OpenPartner, ?cref= followed by the id, or the parameter you set
with a {click_id} macro).
What a leak looks like: the URL arrives clean. Something between the link and the page
dropped the query string: a redirect from http to https, from example.com to
www.example.com, to a language folder like /en/, or a link shortener in front of the
partner link. Every redirect in the chain has to keep the query string.
How to check at scale: in OpenPartner, the Landed share on Tracking health is the share of real partner link clicks that reached a page running the script. When it falls under 70% the page flags it. Check each partner destination URL, not just your home page. Links that go straight to a Stripe Payment Link never land on your site, by design.
2. Every destination page runs the tracking script
Partners link to your home page, your pricing page, a blog post, a comparison page, a landing page your marketing team built last month in a different tool. Each one needs the tracking script (or your server has to read the click id itself), or the click is gone the moment the visitor arrives.
Test: list the destinations partners actually use (your tool’s link report has them) and open each one with a test click id. Check the script loads (your browser’s developer tools, Network tab).
The fix is usually putting the script in the site-wide template, or the <head> setting
of your site builder, instead of page by page.
3. The consent banner doesn’t swallow the click
If your site waits for consent before storing anything in the visitor’s browser, the click id in the URL has to survive until the visitor answers. Many setups lose it: the tracking script is held back until consent, and nothing ever picks the click id up.
Test: click a partner link and accept the banner on the landing page. Was the click kept? Then try again, moving to a second page before you answer.
The fix in OpenPartner: load the script tag in pending mode and grant from your banner.
<script src="https://app.openpartner.dev/op.js" data-api-url="https://app.openpartner.dev/api/t/<your-workspace>" data-consent="pending"></script>// In your consent banner's callbacks:openpartner.setConsent('granted'); // keeps the click it was holdingopenpartner.setConsent('denied'); // drops it, and anything storedWhile pending, the script holds the click in memory for as long as the visitor stays on the page, including a single-page app’s route changes: nothing is stored, no cookie is set and nothing is sent. A visitor who answers the banner on the landing page is covered. One who moves to another page first, on a site where each page is a full page load, leaves the held click behind, which is what the second test shows. A visitor who declines leaves no stored click. Whether you need consent, and for what, is a question for your own legal advice.
4. The click survives a move between subdomains
A visitor who lands on www.yourbrand.com and signs up on app.yourbrand.com is on two
different sites as far as browser storage goes. Storage on www. isn’t visible on app..
Test: click a partner link, then sign up on the app subdomain. Was the signup linked to the click?
The fix: keep the click in a cookie on your parent domain. With the OpenPartner script
tag, add data-cookie-domain=".yourbrand.com". The script writes the op_ref cookie there
and reads it back on any subdomain. With the npm SDK, it’s
referralCookie: { domain: '.yourbrand.com' }.
Completely different domains (a marketing site on one domain, checkout on another) can’t share a cookie. The click id has to be handed over in the link to the other domain, or through your server.
5. The click survives a week in Safari
Safari deletes what a site’s scripts stored, in localStorage and in cookies written by script, after seven days without the visitor interacting with that site. A visitor who clicks a partner link, thinks about it, and comes back two weeks later arrives with nothing stored.
Test: you can’t wait a week in a test, so look at the numbers instead. Compare the share of clicks linked to a customer in Safari, especially on iPhone, with Chrome. In OpenPartner, the By browser table on Tracking health does this for you and highlights a browser that stitches well below the rest.
The fixes:
-
Set the cookie from your server. A cookie set on the landing page’s own response, by the server that serves the page, isn’t subject to the seven-day cap on script storage. It has to come from that server: Safari also caps cookies from servers it treats as a third party behind your domain, such as an API hosted on another provider’s IP addresses.
@openpartner/sdk0.3.0 has helpers for this:import {referralCookieMiddleware,readReferralCookie,} from '@openpartner/sdk/server';// On the server that renders your landing pages:app.use(referralCookieMiddleware({ domain: '.yourbrand.com' }));// At signup, from your backend (op is your OpenPartnerServer):const cref = readReferralCookie(req.headers.cookie);if (cref) await op.identify({ cref, userId: user.id });The browser SDK reads the same
op_refcookie back, foridentify()and Stripe checkouts. -
Link the click to the customer as early as you can. Once a click is tied to the user id your conversions will carry, it no longer depends on the browser. Call
identify()as soon as that id exists, at account creation, not after onboarding.
6. In-app browsers
A creator’s followers tap links inside Instagram, TikTok or Facebook, which open in the app’s own browser. That browser often keeps cookies and storage of its own, separate from the phone’s main browser, especially on iPhone. A visitor who taps the link, then buys later in Safari or Chrome, can arrive without the click.
Test: tap a partner link in an Instagram story or bio, then open your site in the phone’s main browser and sign up. Was the click kept?
The fixes: what carries the click across is something that happens inside the in-app browser: an account created there, linked to the click. Partner coupon codes help too, because a code doesn’t depend on any browser. Expect in-app traffic to stitch less than the rest and judge creators’ programs with that in mind.
7. Signup links the click to the customer
This is the step that makes later payments creditable on any device: your app tells the tracking tool which click this new user came from.
Test: click a partner link on your phone, sign up there, then pay on your laptop a day later. The partner should be credited. This one test covers more of the chain than any other.
What a leak looks like: signups that never link to a click. A common cause is a script tag copied from another OpenPartner workspace, or a test environment: the signup call names a click the tool has never heard of and is rejected. OpenPartner counts these under Dropped by OpenPartner, with the latest click id it rejected, so a misconfigured tag shows up as a number instead of silence.
8. The checkout carries the click
If your customers pay on a hosted checkout, the click has to travel with the payment or the customer has to be linked already.
On Stripe: OpenPartner’s script hands the click to Stripe Payment Links, Pricing Tables
and Buy Buttons as their client reference, when they don’t already carry one of yours. If
your own backend creates Checkout Sessions, pass the referral in client_reference_id
yourself. The leak to look for: Checkout Sessions that put your own order or user id there.
Then partner clicks can’t ride on it, and payments through that path are lost unless the
customer was linked at signup or used a partner code. OpenPartner counts these
as Stripe checkout carried your own reference. Pass the referral instead, or link the
customer with openpartner_user_id metadata.
On other processors (PayPal, Paddle, your own billing): report the conversion from your
server when the payment succeeds, with your user id if the customer signed up through
identify(), or with the click id. Systems that only know the click id, like a CRM or a
lender, can report by click id or call a postback
URL.
9. Every payment reaches the tracking tool
A webhook endpoint that’s down, rejects the signature after a key rotation, or times out loses payments silently. Stripe retries a failed delivery for up to three days in live mode, then stops.
Test: compare the paid revenue in your billing system with what your tracking tool recorded, for the same period. Every gap should have an explanation: missed payments, or payments the tool was never meant to see.
In OpenPartner, with Stripe connected through the Stripe App, Tracking health does this comparison for you. It reads your paid invoices and paid one-time Checkout payments created in the window, and lists the ones that were never recorded but would have credited a partner: a partner signal (a linked customer, a partner’s click on the checkout, or a partner’s code) that passes the attribution rules. Payments whose signal wouldn’t have earned credit, like a click outside the window, are counted separately, with the reason. It also checks Stripe every six hours for events from the last 72 hours that no webhook delivered, and records them.
On other processors, export last month’s paid orders and compare the count and revenue
with the conversions OpenPartner recorded. A server-to-server call that fails should be
retried by your code: send an externalEventId (your invoice or order id) and a retry can
never count a sale twice.
10. The right partner gets the credit
A conversion can arrive and still credit nobody, or credit someone you didn’t expect.
Check the uncredited conversions. OpenPartner groups them by reason on Tracking health: no partner click on record (which includes everyone who came on their own, so it’s a ceiling, not a loss), only clicks flagged as fraud or from revoked partners, partner clicks older than the attribution window, or a conversion recorded before its click was linked.
Check your attribution window against how long your customers take to buy. If a lot of conversions have a partner click just outside the window, the window may be shorter than your sales cycle.
Check coupon codes against links. When a customer arrives through one partner’s link and checks out with another partner’s code, the code wins under last click. If codes are leaking to coupon sites, that’s sales taken from the partners who did the work. Coupon codes vs affiliate links covers how to measure it and what to change.
Make it a habit
The full audit takes an afternoon. After that, a few checks catch most regressions:
- After any change to redirects, consent, signup or checkout, run the phone-to-laptop test from step 7.
- Monthly, compare paid revenue in your billing system with recorded and credited revenue in your tracking tool, and look at the per-browser stitch rates.
- When a partner reports a missing sale, ask for the date and roughly what the customer did, and find the step where it stopped. One missing sale is often the first sign of a whole checkout path.
No tool can credit a sale that left no trace at all: no click kept by the browser or your server, no linked account, no partner code. But many losses aren’t like that. They start a trace and lose it somewhere along the way, and those are the ones an audit finds.
Sources
Checked on October 24, 2026.
- Safari’s limits on script-written storage and on cookies from servers it treats as third parties: Tracking Prevention in WebKit.
- Stripe’s webhook retries: Receive Stripe events in your webhook endpoint.