<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo" -->

---
title: Keeping events from getting lost to ad blockers | daily.dev
description: Sentry's JavaScript SDKs from version 11.13 route events through your own server with tunnel: true in the browser and one server integration. The tunnel path...
canonical: https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Keeping events from getting lost to ad blockers | daily.dev
og:description: Sentry's JavaScript SDKs from version 11.13 route events through your own server with tunnel: true in the browser and one server integration. The tunnel path...
og:url: https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo
og:image: https://api.daily.dev/og/posts/9ariu1ioo.png
og:image:alt: Keeping events from getting lost to ad blockers
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Keeping events from getting lost to ad blockers

**[Sentry Engineering](https://daily.dev/sources/sentry)** · 12 min read · 0 upvotes · 0 comments

## Summary

Sentry's JavaScript SDKs from version 11.13 route events through your own server with tunnel: true in the browser and one server integration. The tunnel path is a 32-bit FNV-1a hash of the DSN, so the browser and server agree without coordinating through the build. Random per-build paths broke with split builds and rolling deploys. Requests are now intercepted at the runtime level (Node, Bun, Deno, Workers, Lambda), which removed 623 lines of per-framework hooks. The handler only forwards envelopes for DSNs in allowedDsns and leaves cookies behind. On Vercel, Next.js needs a generated route file.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.sentry.io/sentry-tunnel-ad-blockers>

## Questions this post answers

### How do I stop ad blockers from dropping Sentry events in my JavaScript app?

Upgrade the Sentry JavaScript SDKs to 11.13.0 or later, set tunnel: true in the browser Sentry.init, and add Sentry.serveTunnelIntegration() to the server Sentry.init. Events then go through your own origin, which ad blockers let through. If the browser uses a different DSN than the server, list it in allowedDsns.

_Developers shipping error monitoring to real users follow SDK changes like this on daily.dev._

### Why use a hash of the DSN instead of a random per-build path for a Sentry tunnel?

A random path per build breaks when browser and server builds run as separate steps, since each rolls its own path and requests 404. Rolling deploys also leave old bundles posting to a dead path. A 32-bit FNV-1a hash of the DSN needs no coordination, because both sides already know the DSN.

_Anyone designing client-server contracts that survive split builds will find similar lessons on daily.dev._

### Why does the Sentry tunnel on Vercel with Next.js need a route file?

On Vercel, routes missing from a Next.js app's build output are answered with a 404 before the request reaches the app, so runtime interception never runs. A rewrite would work but forwards the whole request to sentry.io, cookies included. The SDK writes app/tunnel/route.ts, a one-line export of POST from @sentry/nextjs/tunnel, at build time when deployed on Vercel.

_Teams debugging Vercel and Next.js deployment quirks can keep up with them on daily.dev._

## Similar posts on daily.dev

- [Sentry JavaScript SDK v11 adds tracing for all JS platforms](https://daily.dev/posts/sentry-javascript-sdk-v11-adds-tracing-for-all-js-platforms-w3nhnrm1k) · Sentry Engineering · 0 upvotes · 0 comments
- [Next.js 16.3: Instant Navigations, Up to 90% Less Dev Memory and Faster Builds](https://daily.dev/posts/next-js-16-3-instant-navigations-up-to-90-less-dev-memory-and-faster-builds-abksajvqx) · InfoQ · 3 upvotes · 1 comments
- [Fixing Server Component Bundle Leaks in Next.js](https://daily.dev/posts/fixing-server-component-bundle-leaks-in-next-js-a3htgnywf) · SitePoint · 1 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#nextjs](https://daily.dev/tags/nextjs), [#observability](https://daily.dev/tags/observability)

[View this post on daily.dev](https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Keeping events from getting lost to ad blockers","url":"https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo"},"datePublished":"2026-11-27T19:57:46.101Z","dateModified":"2026-11-27T19:58:09.165Z","description":"Sentry's JavaScript SDKs from version 11.13 route events through your own server with tunnel: true in the browser and one server integration. The tunnel path...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/027d130fed921559b5f6c444fdeda522?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/027d130fed921559b5f6c444fdeda522?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Sentry Engineering","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Sentry Engineering","logo":"https://media.daily.dev/image/upload/s--qqXwMThM--/f_auto/v1710505439/logos/sentry","url":"https://daily.dev/sources/sentry"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,nextjs,observability","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Sentry Engineering","item":"https://daily.dev/sources/sentry"},{"@type":"ListItem","position":3,"name":"Keeping events from getting lost to ad blockers"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/keeping-events-from-getting-lost-to-ad-blockers-9ariu1ioo#faq","mainEntity":[{"@type":"Question","name":"How do I stop ad blockers from dropping Sentry events in my JavaScript app?","acceptedAnswer":{"@type":"Answer","text":"Upgrade the Sentry JavaScript SDKs to 11.13.0 or later, set tunnel: true in the browser Sentry.init, and add Sentry.serveTunnelIntegration() to the server Sentry.init. Events then go through your own origin, which ad blockers let through. If the browser uses a different DSN than the server, list it in allowedDsns. Developers shipping error monitoring to real users follow SDK changes like this on daily.dev."}},{"@type":"Question","name":"Why use a hash of the DSN instead of a random per-build path for a Sentry tunnel?","acceptedAnswer":{"@type":"Answer","text":"A random path per build breaks when browser and server builds run as separate steps, since each rolls its own path and requests 404. Rolling deploys also leave old bundles posting to a dead path. A 32-bit FNV-1a hash of the DSN needs no coordination, because both sides already know the DSN. Anyone designing client-server contracts that survive split builds will find similar lessons on daily.dev."}},{"@type":"Question","name":"Why does the Sentry tunnel on Vercel with Next.js need a route file?","acceptedAnswer":{"@type":"Answer","text":"On Vercel, routes missing from a Next.js app's build output are answered with a 404 before the request reaches the app, so runtime interception never runs. A rewrite would work but forwards the whole request to sentry.io, cookies included. The SDK writes app/tunnel/route.ts, a one-line export of POST from @sentry/nextjs/tunnel, at build time when deployed on Vercel. Teams debugging Vercel and Next.js deployment quirks can keep up with them on daily.dev."}}]}
```

