Free cookie consent banner for any website.
Build it on the left. Copy the snippet on the right. Paste it into your site's HTML and you're done — visitors see the banner once, pick Accept or Reject, and the site remembers their choice. No account, no SDK, no monthly fee.
Banner copy
Appearance
Granular categories
Paste into <head>
<script>
window.PSC_COOKIES = {
"message": "We use cookies to improve your experience and to measure how this site is used.",
"accept": "Accept all",
"reject": "Reject all",
"policyUrl": "/privacy",
"policyLabel": "Read our cookie policy",
"position": "bottom",
"brand": "Powered by policystamp.com"
};
</script>
<script src="https://policystamp.com/banner.js" async></script>How to install the banner
Four steps. About a minute total — no account, no SDK, no build step.
Configure the banner
Pick the message, button labels, position, and a colour palette that matches your site. The live preview on the right updates as you type.
Copy the embed snippet
window.PSC_COOKIES ={
message: "We use cookies…",
accent: "#2563eb"
};
</script>
<script src="…/banner.js"></script>
Click Copy on the snippet
panel. It's two <script> tags — one inline
config, one tag that loads /banner.js from our CDN.
Paste into <head>
Paste both <script> tags into your site's <head>. On Webflow, Framer,
WordPress, Shopify, etc. that's the "Custom Code" / "Header injection" field.
On a static site, drop them straight into the HTML.
You're live
Refresh your site. The banner shows on the first visit, remembers the visitor's
choice in their browser, and won't appear again unless they clear it (or you
call PSC.showBanner() from a "Cookie
settings" link in your footer).
If you enabled granular categories, listen for the psc:consent window event and load your
analytics / marketing scripts only when the relevant category is true:
window.addEventListener('psc:consent', (e) => {
const { categories } = e.detail;
if (categories?.analytics) loadGoogleAnalytics();
if (categories?.marketing) loadAdPixels();
});How the banner works
Vanilla JavaScript. No framework, no tracker. Inline styles only so your site's CSS can't break it.
Local-first consent record
Visitor choice is stored under localStorage["psc_consent_v1"] on their own browser. The banner doesn't show again unless they clear storage. No
data leaves their device.
psc:consent window event
Listen for this event to gate your own scripts. The event detail includes { choice, categories, at } — wait for analytics to be true before loading GA, for marketing before loading
ad pixels, etc.
PSC.showBanner()
Call this from a "Cookie settings" link in your footer to let visitors revisit their choice. Clears the stored consent and re-mounts the banner.
You'll want a cookie policy too.
A consent banner without a policy to link to is half a story. Generate a tailored cookie policy in the same five minutes.
Cookie Policy Generator →