How to add a cookie banner on WordPress
WordPress
Step-by-step: paste your privacy policy URL
- Generate your hosted cookie banner script URL.
- Add it via a header/footer plugin, your child theme’s wp_head hook, or a consent plugin that accepts an external script URL.
- Disable duplicate cookie banners so only one UI collects consent.
- Clear caches (plugin + CDN) and verify the banner on a private window.
- Check GA4/Ads tags fire only after the appropriate consent update.
FAQ
Will caching break the banner?
Full-page caches can serve stale HTML. Exclude the banner script from aggressive defer/combine rules if it stops loading.