PHPackages                             oliverkroener/ok-prive-consent - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. oliverkroener/ok-prive-consent

ActiveTypo3-cms-extension[Authentication &amp; Authorization](/categories/authentication)

oliverkroener/ok-prive-consent
==============================

Provides a backend module to manage privacy cookie consent scripts for Prive Cookie Consent.

5.0.0(1mo ago)045↓94.1%GPL-2.0-or-laterPHPPHP ^8.2

Since Oct 18Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/oliverkroener/ok_prive_consent)[ Packagist](https://packagist.org/packages/oliverkroener/ok-prive-consent)[ Docs](https://www.oliver-kroener.de)[ RSS](/packages/oliverkroener-ok-prive-consent/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (18)Used By (0)

Prive Consent (`ok_prive_consent`)
==================================

[](#prive-consent-ok_prive_consent)

[![TYPO3 14](https://camo.githubusercontent.com/e529124be6a5d4fa54f1e7947268a827ebb324837ad7d64b2eaf2dea68a14b83/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31342d6f72616e67653f6c6f676f3d7479706f33)](https://get.typo3.org/version/14)[![PHP 8.2+](https://camo.githubusercontent.com/ccaa43fc634d348cffccb1d8db7b55d9f17c5d46944bc99a15c3c982724b387d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net/)[![License: GPL v2+](https://camo.githubusercontent.com/6453309dcfa061355d200754f7c0067d22bebd9d9c754ce6b9216176e797e8ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d47504c25323076322532422d626c7565)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)[![Version](https://camo.githubusercontent.com/ccdd6da9eeaf2b479150a5c696f65f8ec2a86a0bfe32d19aaa1b8eaf067315b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d352e302e302d677265656e)](https://github.com/oliverkroener/ok-prive-consent)

TYPO3 backend module for managing [Prive Cookie Consent](https://www.prive.eu/) banner scripts.

Features
--------

[](#features)

- **Backend module** under *Web &gt; Prive Consent* for editing consent scripts
- **Enable/disable toggle** to activate or deactivate the banner without removing the script
- **Multi-site support** -- automatically resolves the correct site root per TYPO3 site configuration
- **Unsaved changes protection** -- warns before navigating away with unsaved modifications (with "save and close" support)
- **Automatic frontend rendering** -- script and cookie settings button injected before `` by a PSR-14 event listener (no TypoScript or template changes required)
- **Cache flush on save** -- frontend page cache is cleared automatically after saving
- **Cookie settings button** -- fixed-position floating button with SVG cookie icon for visitors to reopen consent dialog

Requirements
------------

[](#requirements)

- TYPO3 14.3 LTS
- PHP &gt;= 8.2 (8.2–8.5)

Installation
------------

[](#installation)

### Composer (recommended)

[](#composer-recommended)

```
composer require oliverkroener/ok-prive-consent
```

### Extension Manager

[](#extension-manager)

Download or upload the extension and activate it via *Admin Tools &gt; Extensions*.

### No site set required

[](#no-site-set-required)

The consent banner renders automatically on every frontend page once the extension is installed -- it is injected by a PSR-14 event listener registered through the extension's `Services.yaml`. **No site set, TypoScript, or template change is needed.**

A site set named `oliverkroener/ok-prive-consent` is still shipped (so existing site configurations that reference it under `dependencies` keep working), but it is now a no-op and entirely optional.

Usage
-----

[](#usage)

1. Navigate to **Web &gt; Prive Consent** in the TYPO3 backend
2. Select a page in the page tree (the module resolves the site root automatically)
3. Toggle **Enable Prive script** to activate/deactivate the banner
4. Paste the JavaScript snippet from your [Prive](https://www.prive.eu/) dashboard
5. Click **Save**

The consent script and a cookie settings button are rendered automatically in the page footer on all frontend pages.

Configuration
-------------

[](#configuration)

The extension works out of the box once installed -- the banner is injected by the event listener with no further configuration. To customise the cookie settings button, override the styles from `Resources/Public/Css/prive-cookie-button.css` in your site package.

Brand colours: primary `#f05722`, secondary `#0fa8dd`.

Architecture
------------

[](#architecture)

```
TYPO3 Backend --> ConsentController --> sys_template table
                       |
              ModuleTemplateFactory,
              SiteFinder, ConnectionPool
                    (TYPO3 core)

Frontend --> AfterCacheableContentIsGeneratedEvent
                  |
             InjectBannerScript (listener) --> DatabaseService --> sys_template table
                  |                                  |
          inject before               SiteFinder (TYPO3 core)

```

ComponentPathDescription`ConsentController``Classes/Controller/Backend/`PSR-7 controller (`#[AsController]`) with `indexAction` and `saveAction``InjectBannerScript``Classes/EventListener/`PSR-14 listener on `AfterCacheableContentIsGeneratedEvent`; splices the banner markup before ```DatabaseService``Classes/Service/`Resolves the site and builds the banner markup via `getBannerMarkup(ServerRequestInterface)`Module registration`Configuration/Backend/Modules.php`Declarative backend module under Web menu with page tree navigationIcon registration`Configuration/Icons.php`SVG module icon via `SvgIconProvider`JavaScript modules`Configuration/JavaScriptModules.php`ES6 module mapping for `@oliverkroener/ok-prive-consent/`Dependency injection`Configuration/Services.yaml`Autowiring + autoconfigure (the event listener is auto-registered via `#[AsEventListener]`)Site set`Configuration/Sets/OkPriveConsent/``config.yaml` + no-op `setup.typoscript`; kept only so existing site-config references stay validFluid templates`Resources/Private/Templates/Backend/Consent/``Index.html` -- form with three states (no page, no site, edit)FormDirtyCheck`Resources/Public/JavaScript/backend/`ES6 module for unsaved changes detection with ConsumerScope integrationLocalisation`Resources/Private/Language/`English (`locallang.xlf`) and German (`de.locallang.xlf`)### Database fields (on `sys_template`)

[](#database-fields-on-sys_template)

FieldTypeDescription`tx_ok_prive_cookie_consent_banner_script`textThe JavaScript consent snippet`tx_ok_prive_cookie_consent_banner_enabled`booleanEnable/disable toggleThe fields are declared in `ext_tables.sql` and read/written exclusively via QueryBuilder from the backend module (there is **no** TCA definition). Field names retain the original `ok_prive_cookie_consent` prefix for backward compatibility with existing data.

### Frontend rendering order

[](#frontend-rendering-order)

The listener injects the markup before `` in this order to ensure correct DOM timing:

1. **CSS** -- cookie button stylesheet loaded via `` tag
2. **Cookie button** -- `` element with `data-cc="c-settings"` attribute
3. **Prive script** -- the consent JavaScript snippet (so it can bind to the button already in DOM)

Injecting via a PSR-14 event listener (rather than a TypoScript `page.footerData` USER object) makes rendering independent of site-set load order: a theme set that re-declares `page = PAGE`after this extension can no longer discard the banner. The markup is part of the cacheable page content, so it is stored in the page cache.

Documentation
-------------

[](#documentation)

Full documentation is available in the `Documentation/` directory. Generate rendered docs locally with:

```
make docs
```

This uses the official [TYPO3 Documentation rendering container](https://github.com/TYPO3-Documentation/render-guides).

License
-------

[](#license)

GPL-2.0-or-later

Author — Oliver Kroener
-----------------------

[](#author--oliver-kroener)

### Automated. Scaled. Done.

[](#automated-scaled-done)

Web3 · Cloud · Automation

Technology is only valuable when it solves a real problem. For over 30 years I've been translating between business and tech — so your investment in digitalisation doesn't stall at proof-of-concept but delivers measurable results.

- Website: [oliver-kroener.de](https://www.oliver-kroener.de)
- Web3: [web3.oliver-kroener.de](https://web3.oliver-kroener.de/)
- Email:
- Web3 Email:

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance93

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Recently: every ~26 days

Total

13

Last Release

33d ago

Major Versions

3.0.0 → 4.0.02026-02-13

2.0.0 → 3.1.02026-02-17

2.1.0 → 3.1.12026-02-18

3.1.2 → 4.1.02026-02-18

4.1.1 → 5.0.02026-06-01

PHP version history (5 changes)3.0.0PHP &gt;=8.0

2.0.0PHP &gt;=7.4

2.1.0PHP &gt;=7.2

4.1.0PHP &gt;=8.1

5.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e3131f46d9c0fc7766936f374848d0ab6be6f8095f2f2c01984736a5e7fcd52?d=identicon)[Oliver Kroener](/maintainers/Oliver%20Kroener)

---

Top Contributors

[![oliverkroener](https://avatars.githubusercontent.com/u/4545439?v=4)](https://github.com/oliverkroener "oliverkroener (27 commits)")

---

Tags

typo3gdprtypo3-extensionprivacycookie-consentconsent-managementbackend-moduleprive

### Embed Badge

![Health badge](/badges/oliverkroener-ok-prive-consent/health.svg)

```
[![Health](https://phpackages.com/badges/oliverkroener-ok-prive-consent/health.svg)](https://phpackages.com/packages/oliverkroener-ok-prive-consent)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[wazum/sluggi

TYPO3 extension for URL slug management with inline editing, auto-sync, locking, access control, and redirects

40529.5k](/packages/wazum-sluggi)[pagemachine/typo3-formlog

Form log for TYPO3

23238.6k8](/packages/pagemachine-typo3-formlog)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

611.1M8](/packages/netresearch-rte-ckeditor-image)[in2code/femanager

Modern TYPO3 Frontend User Registration.

53790.4k8](/packages/in2code-femanager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
