Launch offer: the first 1,000 users get Business free. Claim your spot →
All posts
Conversion trackingBy the directinapp team7 min read

Server-side conversion tracking: why the browser is the worst place to count a sale

Ad blockers, closed tabs and privacy modes all eat browser-fired conversions — and never evenly. Moving the count to your server fixes both the undercount and the bias.

A rack of servers in a server room
Photo by Kevin Ache on Unsplash

Server-side conversion tracking records a sale from your own backend — usually when a payment provider or your order system confirms it — instead of from a script in the buyer’s browser, so the conversion is counted even when the tab is closed, a blocker strips the script, or the buyer never returns to your site.


Almost every store starts by counting conversions in the browser. A script on the thank-you page fires when the buyer lands there, and that becomes the sale. It is easy to set up and it is wrong more often than most people realise.

The problem is not that browser tracking is inaccurate. It is that it is inaccurate in a *pattern*, and the pattern quietly rewrites your marketing decisions.

Everything that eats a browser-fired conversion

A conversion recorded in the browser has to survive a long chain of things going right. Any one of them failing loses the sale from your reporting while the money still arrives in your account.

What happensEffect on a browser-fired conversion
Buyer closes the tab after payingNever fires
Payment completes in a UPI or bank app, buyer never returnsNever fires
Ad blocker or tracking protectionScript blocked
Private or restricted browsing modeOften blocked
Flaky mobile connection on redirect backFires unreliably
Buyer pays on phone, ordered on desktopFires against the wrong session, or not at all

The bias is worse than the undercount

If browser tracking simply lost a flat share of every channel’s sales, it would be annoying but harmless — every channel would shrink together and the ranking would hold.

It does not work that way. Mobile buyers on messaging apps and UPI drop off far more than desktop buyers paying by card. So the channels that send mobile traffic look systematically worse than they are, and the ones that send desktop traffic look better. Act on that and you cut spend on the thing that was quietly working. An undercount you can mentally adjust for; a *biased* undercount will actively mislead you.

What moving it server-side looks like

The change is smaller than it sounds. Instead of trusting a script in a browser you no longer control, you record the sale from a system that already knows it happened.

When someone taps your short link, a click identifier is set. It travels with them through checkout and is stored against the order. When your backend — or your payment provider’s webhook — confirms the payment, it sends that identifier back with the sale. The conversion is recorded from your server, where nothing can block it. Razorpay conversion tracking walks through this for one specific gateway.

Three things to get right

A server-to-server endpoint is a public URL, so **verify the signature** on every incoming call and reject anything unsigned. Otherwise a stranger can invent sales in your dashboard and you will plan a quarter around fiction.

**De-duplicate on the provider’s own id.** Webhooks retry when they do not get a clean response, so the same payment will sometimes arrive twice. Record against the payment id and ignore repeats, or one sale becomes three.

**Send refunds too.** A channel with many orders and many refunds is not the channel it appears to be, and attribution that only ever counts upward will eventually recommend your least profitable audience.

It is also the version that survives

Third-party cookies are gone, tracking protection is on by default in more browsers every year, and the trend runs one way. A measurement approach that depends on a script executing in someone else’s browser gets less reliable over time; one that depends on your own server confirming your own order does not. The wider shift is covered in first-party versus third-party cookies.

The setup is documented on the server-side conversion tracking page, and it is a one-time job.

Found this useful? Tell Google to show you more of it.

Add us as a preferred source

Related guides

Put this into practice

Create smart short links that open the right app, with analytics built in. No credit card required.

Start free