policystamp.com
Home / Cookie Banner

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.

· GDPR + CCPA ready · About 60 seconds to install · Works with any CMS or static site
Step 01

Banner copy

Step 02

Appearance

Position
Theme
Quick palettes
Corners
Typography
Step 03 — optional

Granular categories

Embed snippet

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>
Live preview
We use cookies to improve your experience and to measure how this site is used.
Read our cookie policy
Powered by policystamp.com
Installation

How to install the banner

Four steps. About a minute total — no account, no SDK, no build step.

Step 01

Configure the banner

Banner copy
Theme
Light Dark Custom

Pick the message, button labels, position, and a colour palette that matches your site. The live preview on the right updates as you type.

Step 02

Copy the embed snippet

Embed snippet Copy
<script>
  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.

Step 03

Paste into <head>

index.html
<!DOCTYPE html>
<html>
  <head>
    <title>Your Site</title>
    <script>window.PSC_COOKIES={…};</script>
    <script src=…/banner.js async></script>
  </head>
  <body>…</body>
</html>

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.

Step 04

You're live

yoursite.com
We use cookies to improve your experience and to measure how this site is used.
Read our cookie policy
Powered by policystamp
Reject Accept

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).

Optional · Gate your analytics with consent

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.

Persistence

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.

Hook

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.

Re-prompt

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