Run the Collector Yourself
The collector is the only part of ZeroConfig that runs on your infrastructure. You do not have to let us deploy it.
TL;DR
- The collector is the only part of ZeroConfig that runs on your infrastructure, and you can host it yourself.
- Cloudflare is one click because we hold a token for it. Every other platform hands you a build to deploy.
- Two capabilities decide whether a platform works: can it serve a path on your own domain, and can it make an outbound call.
- Injecting the script tag is optional. Where a platform cannot do it well, the tag goes in your template instead.
- A published contract and a conformance test you can run mean a platform we have never tried needs no blessing from us.
Why this exists
ZeroConfig started as a Cloudflare-only product, which meant a prospect not already on Cloudflare was disqualified and the conversation became “migrate your DNS”. That is a bigger ask than the product. It also meant a security team could not satisfy itself about code running in front of all their traffic, because we deployed it.
Both problems have the same answer: publish what the collector must do, let anyone run one, and give them a way to check it. The collector is small — no dependencies, no build step that fetches anything, and the whole decision logic in one readable file.
What decides whether a platform works
Two things, and neither is “does it run JavaScript at the edge”. A platform needs to answer a request on your own domain — that is the entire reason the product exists, because a request to your origin is not a third-party request — and it needs to make an outbound call, which is what keeps the credential off the page.
Rewriting your HTML to add the script tag is optional. Every platform that cannot host a collector at all fails for the same reason: it will run your JavaScript but will never answer a path on your domain. That is why the website builders cannot do this and a plain nginx can.
The platforms
Cloudflare Workers
One clickWe deploy it into your own Cloudflare zone. Nothing to host, nothing to build, and the script tag is injected for you by HTMLRewriter.
Fastly Compute
You publishThe closest peer to Workers. Streaming injection, and a backend has to be declared for the ingestion endpoint — Fastly refuses an outbound call to a host it does not know about.
nginx + njs
You installFor a team that already terminates its own TLS. njs serves the four endpoints and nginx does the injection with sub_filter, which is C and streams, so JavaScript never touches your HTML.
AWS Lambda@Edge
Collect onlyA viewer-request trigger never sees a response body, and the trigger that does sees it buffered under a hard cap — so injection would work on small pages and fail on large ones. The tag goes in your template. In exchange, normal traffic passes through untouched.
Akamai EdgeWorkers
Collect onlyAkamai has a real streaming HTML parser, but using it means routing all your HTML through responseProvider, which Akamai serves uncompressed. Uncompressed HTML on every page view is a worse trade than one line in a template.
Something else
If it passesA reverse proxy you wrote, a framework route, a CDN nobody here has tried. If it can serve a path on your domain and make an outbound call, it qualifies — and the conformance test tells you, rather than us.
Four of the five self-hosted targets have not yet run on the platform they are written for — each one's documentation says so in its first paragraph, and the first deployment should be treated as a test. The conformance test is what turns that from a hope into something you can check.
The contract, in seven rules
A collector that holds to these is supported, whatever it runs on. One that breaks one is not, even if we wrote it.
Refuse cross-origin posts
The one that matters most. The collection path is readable by anyone who views the script, so a collector that accepts a foreign post is an endpoint for forging conversions into your own ad accounts — and it looks healthy from every other angle.
Never let the credential reach the page
It goes on the outbound call only. A credential in the page is a permanent conversion-forging key for that account.
Serve under your own path prefix
Per-account and random. A fixed path is what lets one blocklist rule stop collection across every customer at once.
Scope cookies as configured
Get this wrong and browsers discard the cookie silently — no error anywhere, click-id capture simply stops. This is not hypothetical; it is the bug the conformance test found on its first run.
Fetch capture rules at runtime
So you never rebuild the collector because someone edited a selector.
Pass consent signals through unchanged
Report what the page saw and let the server apply precedence. A collector that decides for itself will disagree with the server, and the disagreement will be invisible.
Identify yourself and your version
Recorded against every event, so a support question starts from a known build rather than a guess.
Checking it, rather than trusting it
Every collector ships with a conformance test you run against your own deployment. It checks the things that are dangerous to get wrong rather than the things that are easy to see — above all that a foreign site cannot post conversions to your endpoint.
It never sends a conversion, so it is safe to run against production: every request it makes is either expected to be refused or carries a body the collector rejects before anything is forwarded. A test you cannot run against production is a test nobody runs.
Three rules it cannot check from outside — whether your visitor's IP is forwarded, whether Global Privacy Control is passed through, and which build is running — it reports as unobservable rather than passing them on faith, and tells you where to look instead.
What self-hosting costs you
Updates become yours. Today the collector and the server ship together; a collector you hold is a build we did not deploy and cannot inspect. That is why it reports its version with every event, why ZeroConfig's Server Logs show which build is actually running, and why the ingestion API keeps accepting an old version for at least twelve months after a new one ships — we cannot redeploy your collector for you, so dropping support early would stop your conversions and you would find out from your ad spend.
If none of that appeals, stay on the managed Cloudflare path. It is one click and we keep it current.
FAQ
Do I have to self-host to use ZeroConfig?
No. On Cloudflare we deploy the collector for you in one click, which is how most accounts run. Self-hosting exists for teams who are not on Cloudflare, or whose security review requires that code running in front of their traffic be deployed by them.
What can the collector see?
Requests to your own domain, which is what lets it read click-id cookies and your visitor's IP address. It never sees your ad platform credentials — those stay in ZeroConfig. It holds one credential that authorises events for your account and nothing else.
Can my security team review it before we sign anything?
Yes. The collector has no dependencies and no build step that fetches anything. The whole decision logic is one file of about 400 lines, including comments explaining why each part is the way it is.
What happens if the collector credential leaks?
Rotate it from the setup page. That revokes the previous credential for your account alone and nobody else is affected. It takes effect immediately, so the collector has to be rebuilt and there is a gap in collection until it is — which is the point of a revocation.
What if my platform is not on the list?
Run the conformance test against it. The contract is published, so a platform we have never tried is supported if it passes — a hand-rolled proxy that passes is as supportable as a build we wrote.
Who keeps a self-hosted collector up to date?
You do, which is the real cost of self-hosting. The collector reports its version with every event, so ZeroConfig's Server Logs show which build is actually running, and the ingestion API keeps accepting an old version for at least twelve months after a new one ships.