Cloudflare Worker
Every request, before every cache
The worker runs at Cloudflare's edge, ahead of your cache and your origin, so it sees every request that reaches your domain. It reports the AI crawlers among them and writes your schema.org markup into the HTML on the way out. One script, one deploy, and it does not care what runs behind it.
The only channel that sees everything
A plugin runs inside your application, so a full-page cache answers before it ever loads. A worker runs in front of the cache. That difference is the whole reason this option exists, and it is why the crawler counts from here are totals rather than floors.
Cloudflare runs the worker on each request that reaches your domain, cached or not. Nothing downstream can hide a crawler visit from it, so the numbers do not need a footnote.
Baseline generates and stores your schema; the worker fetches it per URL and writes it into the head. No schema logic runs at your edge, so there is nothing there to go stale.
Every visitor gets byte-identical output, human or bot. The worker reads the user agent to decide what to report to us and nothing else. An automated test drives it with both and diffs the two responses.
If Baseline is unreachable, or has nothing for a page, the worker emits nothing and the response passes through untouched. A delivery integration must never be able to break a site.
WordPress, Next.js, Rails, Django, a static bucket. The worker sits in front, so what you run at origin is not its business and you change nothing there.
Bot reporting costs nothing and needs no plan. The same script starts injecting schema the moment you have a plan for the domain, with no second deploy and no re-paste.
Deploy it, step by step
Four steps. Your script arrives pre-filled with your domain, your ingest token and your ownership tag, so there is nothing in it to edit.
-
Name the site you are connectingWe do not guess this. Registering the site named above is what mints the ingest token your worker presents on every batch, and it is what your ownership tag is derived from.
-
Get your worker scriptOne file, no dependencies, nothing to configure. Register the domain above and it appears here.
-
Deploy it, then give it a routeIn the Cloudflare dashboard, open Workers & Pages, click Create, start from the Hello World template, replace the editor contents with the script, and Deploy.
A deployed worker runs on nothing until you point traffic at it. Open the worker's Settings → Domains & Routes, add a route, and use the pattern below. It has to end in
/*or your homepage is not covered, which is exactly the page we read when we verify.yourdomain.com/*
Pick the zone that actually serves the domain. If Cloudflare has been caching the site, purge the cache afterwards, or you will be reading a copy that predates the worker.
Or from the command line
# Save the script from step 2 as worker.js first. npx wrangler init baseline-connector --yes npx wrangler deploy worker.js --name baseline-connector \ --route "yourdomain.com/*"
-
Check it from our sideCloudflare will tell you the worker deployed. This tells you whether it is actually running on your traffic, which is a different question and the one that counts. It answers for the site named at the top of this walkthrough.
baseline-channel. If that meta tag is in the raw HTML, the worker is running and crawlers can see everything it emits.Three things worth knowing before you deploy
What you need
| Cloudflare | A zone for the domain, on any plan including the free one. Workers are included. |
|---|---|
| Account | A free Baseline Labs account. Sign up - no card. |
| Bot reporting | Free, on every plan, with no domain limit beyond the ones you have registered. |
| Schema injection | Needs a plan with a spare domain slot. The worker is the same either way - it simply injects nothing until there is schema for the page. See pricing. |
| Route | A route pattern ending in /*, on the zone that serves the domain. |
There are two other ways in
Three channels deliver the same schema and report the same crawler traffic. Pick whichever matches your stack - they also run together happily.
Put the whole picture at the edge
One worker, complete crawler counts, and your schema in the HTML that AI systems actually read.