Cookie banner
Cloudflare Zaraz
Connect the cookie banner to Cloudflare Zaraz consent management so tools Zaraz loads on the server wait for the visitor's choice.
Cloudflare Zaraz loads third-party tools on Cloudflare's servers, not in the visitor's browser. A cookie banner running in the page cannot block them. If Zaraz sets cookies or loads tools before the visitor answered, the banner needs to hand the choice to Zaraz.
#How it works
When Zaraz exposes its consent API, the banner sends it the visitor's choice. Zaraz purposes whose name matches a category follow that category:
| Zaraz purpose name contains | Category |
|---|---|
| Statistics, Analytics, Measurement, Performance | Statistics |
| Marketing, Advertising, Ads, Targeting | Marketing |
| Preferences, Functional, Personalization | Preferences |
The banner sets each matching purpose to true or false and releases the events Zaraz queued while waiting. It does this on every choice and when a page loads with a saved choice.
#Set it up in Cloudflare
- In Cloudflare, open Web tag management → Consent for your site.
- Create a purpose named Statistics (and Marketing if you use advertising tools).
- Under Assign purposes to tools, assign each tool to its purpose. A tool left on Skip Consent always loads.
- Check Enable Consent Management.
- Uncheck Show consent modal, so Cloudflare's own modal does not appear next to the Privacyboard banner.
- Save.
#Verify
In a private window, before choosing, there should be no Zaraz cookies for your tools, for example cfz_google-analytics_v4. After Accept all and a reload they appear. After Reject all they stay absent.
#FAQ
#Do I need this if I do not use Zaraz?
No. It does nothing when Zaraz is not present on your page.
#Can I use other purpose names?
The banner recognises the words above. Name your purposes accordingly, or tell us the names you need.
Privacyboard is a guidance tool, not legal advice. This page describes what the product does today. Found something unclear or out of date? Write to antoine@unmake.io.