A widget runs on sites that are not yours: your customers embed your booking form, shop or ticket box on their pages. Bot Protection works there too, with three things to get right: where the tag runs, how the token reaches your server, and which domains your plan counts.
In a frame on your own domain (recommended)
Serve the widget from your domain and let your customers embed it in an <iframe>. Put the tag in the page inside the frame, as on any page of yours. Bot Protection then sees your domain, whatever site frames it: one domain for your plan, proven like any other (your home page carries the tag, or you add it on the Set-up page).
In a frame, your page's cookies belong to a third party. Chrome, Edge and Firefox keep them apart for each site that frames you, and Safari keeps none. So do not rely on the _kz cookie there: before the protected action, take the token from the tag and send it yourself.
const token = await window.korzen?.ready(); await fetch("/api/book", { method: "POST", headers: { "content-type": "application/json", "x-korzen-token": token || "" }, body: JSON.stringify(order), });
On your server, the SDK reads that header itself, before the cookie: there is nothing to add.
const input = fromNodeRequest(req, { ip: (_get, r) => r.ip, path: "/api/book" }); const decision = await korzen.decide(input);
Every SDK and the Worker read x-korzen-token first, then the _kz cookie; a header that is empty or no token leaves the cookie. A token you give the call yourself wins over both, and the call from your server takes it in its token field. A frame's storage is kept apart per site too, so the same visitor on two of your customers' sites is two devices to Bot Protection. That is a missing signal, never evidence of a bot.
A script on your customer's page
A widget that is a script your customers paste, with no frame, runs on their page. Then the tag runs on their domain, each of your customers' domains counts toward your plan, and their pages must carry the tag with your site key. Your script calls your server from another origin, where cookies are not sent: send the token in the header as above, and allow x-korzen-token in your CORS answer.
Your customers' own hostnames
A hostname your customer points at you (tickets.theirshop.example, a CNAME) is their domain: it counts as one of your plan's domains, like the script above. Plans protect up to five; with more of your customers' hostnames, serve the widget in a frame on your domain, or write to us.