Ad blockers and missing revenue in analytics: find your gap
By Devendra Variya, co-founder of Virling. Published 2026-11-24.
When an ad blocker stops your analytics script, the visit goes missing but the payment does not. The buyer still pays through your payment provider, so the money is in your account and only the link to a channel is lost. Analytics that counts sales in the browser misses the revenue too. Analytics that reads payments from the provider shows the full total, with part of it credited to no channel. To size your own gap, compare your first payments with the ones credited to a visit, then take out every unmatched payment that has another explanation.
Why the visit is lost but the payment is not
A visit is recorded by the visitor's browser: it downloads a script, and the script sends an event. A blocker can stop either request. A payment is recorded by the provider that charged the card. Nothing on your page has to run for the provider to know about it, and a server that reads payments from the provider talks to it directly, where no extension sits in between.
| What is blocked | The visit | The payment |
|---|---|---|
| The script file | Not recorded. The script sets no cookie | Imported from the provider. Checkout carries no visitor ID, unless the cookie is there from an earlier visit |
| Only the event request | Not recorded. The script can still set its cookie | Imported from the provider. Checkout can carry a visitor ID, but there may be no visit under it |
| A purchase event sent by the browser | Depends on the other requests | Missing from a tool that counts sales this way, still in the provider's records |
The last row is one reason analytics revenue does not match Stripe. Virling imports payments from your provider, so a blocked buyer still counts toward revenue, as Unattributed. That is different from Direct: Direct is a recorded visit that gave no clue about its source, and why Direct is your biggest traffic source covers that one.
Estimate your own gap
Use a finished month, after your script and checkout have been set up for longer than buyers usually take to decide.
- Count the first payments. Take successful payments from your provider and leave out renewals. A renewal has no visit of its own; in Virling it takes the channel of the customer's first payment.
- Count the attributed ones. On the Virling Payments page, Attributed shows how many payments were matched to a visit. That count includes renewals, so for first payments only, read the Read API, where each payment has
is_renewaland the visit it was credited to. - Remove what has another cause. Go through the Unattributed first payments and take out payment links opened from an email or a QR code, invoices sent by hand and imported history. The Unattributed docs list the causes for each provider.
- Divide. The unmatched payments that are left, divided by the first payments you could have matched, is the most that blocking can explain.
Example only, with made-up numbers for an imaginary store in one month:
| Step | Payments |
|---|---|
| All successful payments | 200 |
| Renewals | 60 |
| First payments | 140 |
| First payments credited to a visit | 102 |
| First payments with no visit | 38 |
| Of those, email payment links and manual invoices | 20 |
| Left unexplained | 18 |
| Gap | 18 of 120, or 15% |
The 120 is the 140 first payments minus the 20 that could never have matched. Read the 15% as a ceiling, not as a blocking rate: an expired cookie, declined cookie consent or a purchase on a second device looks the same. It is also a share of buyers, so do not apply it to visitors, who may block at a different rate.
Check it at checkout
If your server creates the checkout, it can see whether the visitor cookie is there. Log one line per checkout and count them after a month:
// Node, with cookie-parser
console.log("checkout", req.cookies.virling_vid ? "with ID" : "no ID");
A checkout with no ID is a buyer whose browser never ran the script on your domain, refused the cookie, or sent Global Privacy Control on a site that respects it. If nearly every checkout has no ID, the cause is your setup and not blocking: start with passing the visitor ID into checkout. In cookieless mode there is never an ID, so this check says nothing there.
Why the gap differs by audience
A published average will not tell you your gap, because what decides it is who your visitors are:
- Who they are. An audience of developers or privacy-minded readers is likelier to run a blocker than one that has never installed an extension.
- Device and browser. Extensions depend on what the browser allows, and some browsers block known trackers with no extension at all.
- Network. Company networks and filtering DNS services can block a host for everyone behind them.
- The script. A blocker that works from a list can only block what is on it, so two tools on one page can be blocked for different visitors. A script loaded through Tag Manager is also blocked wherever the container is, as the Google Tag Manager install guide notes.
This also skews the comparison between channels. If one community blocks more than the rest of your audience, its visits and its revenue both look smaller than they are, and nothing in the credited numbers says so. Measure the gap again when your mix of channels changes, and keep Unattributed in view beside the channels instead of spreading it across them.
Serve the script from your own domain
Some blockers block third-party analytics hosts. If you self-host Virling, you can serve the script and the event endpoint from your site's own domain by proxying two paths to your Virling server:
| Path on your site | Proxies to |
|---|---|
/v.js | https://stats.example.com/v.js |
/api/event | https://stats.example.com/api/event |
Then load the script from your domain:
<script defer src="https://example.com/v.js" data-site="example.com" data-respect-gpc></script>
- The script sends events to
/api/eventon the host it was loaded from. Setdata-apito a full URL to send them somewhere else. - Forward the visitor's IP in
X-Forwarded-For, the user agent and the country header, and setVIRLING_TRUST_PROXY=trueso Virling reads the forwarded address. If a second proxy sits in front of Virling, make sure it keeps the address instead of replacing it with your site's. - Forward
GETas well asPOSTon the event path if you use Until consent.
There is no tested proxy recipe for each platform yet, so check it yourself: open your site and look for a POST to /api/event on your own domain that returns 202. The details are in the reverse proxy docs. It makes the gap smaller, not zero: a blocker can match a path as well as a host. Visits that were blocked before the change stay missing.
Respect Global Privacy Control
A blocked host on a list and a visitor who asks not to be tracked are different things. Global Privacy Control is a signal the browser sends when a person has asked sites not to sell or share their data. With data-respect-gpc on the tag, as in the example above, the Virling script sends nothing for that browser, sets no cookie and adds no ID to checkout links. It does not delete a cookie that is already there. Without the attribute the signal is not read, so adding it is your choice to make, and it works the same from your own domain.
Those buyers show up as Unattributed, which is the right place for them: the money is counted and the visit is not. If you need consent for the cookie, ask for it the same way with or without the proxy. Privacy and consent lists what is stored in each mode.
What to do with the gap
- Fix the checkout first, since a missing visitor ID is the most common cause of Unattributed payments
- Keep the total from your payment provider as the revenue number
- Compare channels on attributed revenue, with Unattributed shown as its own line
- Serve the script from your own domain if you self-host, then compare the weeks before and after
- Ask buyers where they heard of you when the gap is large, as in self-reported attribution
Frequently asked questions
Do ad blockers make revenue disappear from analytics?
It depends on where the tool gets its revenue. If a browser event reports the sale, a blocked script loses the sale too. If the tool imports payments from your payment provider, the total stays right and the blocked buyer's payment shows without a channel.
What share of visitors block analytics?
There is no single number that fits your site, because it depends on your audience, their devices and the script you use. Measure your own: compare first payments with attributed first payments, and log how many checkouts arrive without the visitor ID.
Is every unattributed payment caused by an ad blocker?
No. The most common cause is a checkout that does not carry the visitor ID. Renewals of unattributed first payments, payment links opened from an email, cookieless mode, declined consent and visits outside the lookback window also leave payments unattributed. Rule those out first.
Does a first-party script get past ad blockers?
It helps with blockers that work from a list of known third-party analytics hosts. It does not help with blockers that match paths or script behaviour, or with browsers that have JavaScript turned off, so expect a smaller gap rather than none.
Does Virling respect Global Privacy Control?
Yes, when you add data-respect-gpc to the script tag. The script then sends nothing, sets no cookie and adds no ID to checkout links for a browser with Global Privacy Control on. Without the attribute, the signal is not read. It works the same when you serve the script from your own domain.
See every payment, and the visit behind the ones you can match
Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.