The GDPR & Cookie Consent add-on provides a complete GDPR compliance toolkit for your Larapen site — display a customizable cookie consent banner, log visitor consent decisions for audit compliance, and manage cookie categories from the admin panel.
Key Features
- Cookie consent banner — A polished, responsive banner with Accept All, Reject All, and Customize options. Seven position variants including a centered modal mode.
- Granular cookie categories — Four cookie categories: Essential (always on), Analytics, Marketing, and Preferences. Per-category toggle controls for visitors.
- Consent logging — Full audit trail of every consent decision: IP address, user agent, action taken, and categories selected. GDPR Article 7 compliant.
- Auto-injection — The banner is automatically injected into all front-end pages via middleware. No template changes needed. Skips admin panel and AJAX requests.
- Seven banner positions — Top-left, top-center, top-right, middle-center (modal), bottom-left, bottom-center (default), and bottom-right. Corner positions use compact cards; center positions use full-width bars or modal overlay.
- Preferences panel — Visitors can open a detailed preferences panel to toggle individual cookie categories on or off.
- Consent statistics — Dashboard stats showing total consents, accepted all, rejected all, customized, and acceptance rate for the last 30 days.
- Privacy policy link — Configurable link to your privacy policy page displayed in the banner.
- Consent withdrawal — Visitors can revoke consent at any time via the withdraw endpoint.
Admin Panel
| Section | Description |
|---|---|
| Settings | Configure banner enabled/disabled, cookie lifetime, banner position (visual picker), consent logging, privacy policy URL, and cookie category toggles (Analytics, Marketing, Preferences). |
| Consent Logs | Full audit trail of all consent decisions. Paginated table with visitor info, IP address, action (color-coded badges), category selections, and timestamps. Filter by action type, search by IP/name/email. |
Front-end
- Cookie consent banner automatically displayed on all front-end pages for visitors who have not made a consent choice.
- Three action buttons: Accept All, Reject All, and Customize.
- Preferences panel with per-category toggles (Essential always on, others toggleable based on admin configuration).
- Consent cookie (
gdpr_consent) stores the visitor’s choices for use by JavaScript scripts. - Withdraw consent endpoint for revoking previously given consent.
Configuration
| Setting | Default | Description |
|---|---|---|
| Enabled | Yes | Enable or disable the cookie consent banner globally. |
| Cookie lifetime (days) | 365 | How long the consent preference cookie persists (1–3650 days). |
| Banner position | bottom-center | Where the banner appears (7 positions available). |
| Log consent actions | Yes | Record consent decisions to the database for compliance auditing. |
| Privacy policy URL | (empty) | URL to your privacy policy page, shown as a link in the banner. |
| Analytics category | No | Show the Analytics cookie category toggle. |
| Marketing category | No | Show the Marketing cookie category toggle. |
| Preferences category | No | Show the Preferences cookie category toggle. |
Dependencies
None — the GDPR add-on is fully standalone. It works out of the box once activated, with no dependencies on other add-ons.
Ideal for
- EU/EEA websites requiring GDPR and ePrivacy Directive compliance.
- Sites using analytics tools (Google Analytics, Hotjar) requiring user consent.
- Sites running marketing and ad retargeting scripts (Facebook Pixel, Google Ads).
- Any website needing a transparent cookie consent mechanism with audit logging.