Cookie Consent Banner Generator
1. Head code: paste in <head>, before your Google tag
2. Banner code: paste just before </body>
3. Footer link so visitors can change their choice
The banner stores the choice in localStorage and dispatches a "cookie-consent" event with the value "all", "essential", "custom" or "optout"; window.nwCookieConsent says which categories (analytics, marketing) were allowed. With Consent Mode on, it also sends Google the matching consent update. The banner itself is not legal compliance; your cookie policy and tag behaviour must match.