Cookie Consent Module: GDPR Compliance

Last updated on May 21, 2026 05:09

In today's digital landscape, complying with data privacy regulations like GDPR (Europe) and CCPA (California) is not just good practice—it is a legal requirement. If your website uses analytics (like Google Analytics) or advertising pixels (like Facebook Pixel), you are tracking user data via cookies.

The Cookie Consent Module provides a highly customizable, drop-in banner that informs your visitors about tracking and requests their explicit consent.

Enabling the Banner

  • Navigate to Settings > Modules and enable the Cookie Consent module.

  • Once enabled, a new menu item will appear under Settings > Cookie Consent.

Configuration Options

The module is designed to be plug-and-play, but you can heavily customize its appearance and behavior to match your brand.

1. Banner Content

  • Message: The main text explaining why you use cookies. Keep it clear and jargon-free.

  • Accept Button Text: Usually "Accept All" or "Got it!".

  • Decline/Manage Button Text: Provide users a way to reject non-essential cookies.

  • Privacy Policy Link: Insert the URL to your static Privacy Policy page (which you can create via Content > Pages).

2. Design and Layout

  • Position: Choose where the banner appears (Bottom Fixed, Top Fixed, or Floating Box).

  • Colors: Customize the background color, text color, and button colors to seamlessly integrate the banner with your active Theme.

How It Works Technically

When a user visits your site for the first time, the banner appears.

  • If they click Accept, the module sets a functional cookie (e.g., polycms_consent=accepted) that expires after 1 year, and the banner disappears.

  • If you are a developer injecting tracking scripts (like Google Analytics) via the Theme Development system, you should wrap your tracking code in a conditional check that looks for this consent cookie before firing.

Note: The Cookie Consent module utilizes the @stack('theme-scripts') directive in your theme's app.blade.php file. If your custom theme does not include this directive, the banner will not render.