Cookie Banner Starter Generator
Customize a cookie banner and preference starter snippet. Does not block trackers or establish legal compliance.
Build a cookie banner starter
Customize a small banner and preference example. Optional purposes start off; visitors can save a choice and reopen settings.
This starter stores a visitor's choices in their browser and sends a custom event. It does not scan cookies, block scripts, choose which laws apply, or establish legal compliance. Integrate choices with your own technologies and review the result for your site, region, and current rules. Its inline script may also need changes to work with your Content Security Policy.
Banner settings
The generator runs in this browser. Values are not submitted or saved by this tool.
Preview
Your site Choose whether to allow optional analytics or marketing technologies. Privacy policy
The sample marks its essential purpose as enabled; optional choices start off. It does not manage site storage.
The preview is illustrative. The copied snippet includes its own sample preference storage and settings button; it does not control other site scripts.
Starter snippet
Review and adapt it before adding it to your site.
How to use this starter
- Enter your site name and notice, then add your policy link.
- Choose only the optional purposes your site will actually offer.
- Copy or download the snippet and review the generated code.
- Integrate its preference-change event with your own technologies before loading optional scripts.
- Test keyboard and screen-reader behavior, storage, CSP, and withdrawal in your real site.
This example stores choices in localStorage on the visitor's browser and sends an `infinio:cookie-consent-change` event when the visitor acts. It does not prevent a script from loading; connect that event to your own tag or script controls. Local storage is not an audit log or proof of consent, and inline code may be blocked by your Content Security Policy.
Official references
- EU ePrivacy Directive, Article 5(3)
- EU GDPR, Article 7
- CJEU Planet49 cookie consent ruling
- UK ICO: cookies and similar technologies
- India Digital Personal Data Protection Act, 2023
- MDN: Web Storage API
Sources reviewed 9 October 2026. Laws and guidance may change; confirm current rules and local requirements.