pits / pits_cookieconsent
GDPR-compliant cookie consent solution for TYPO3 v14 and v13. Renders a fully customisable consent banner and preferences modal (vanilla Cookie Consent v3) with cookie categories, consent-based script blocking via TypoScript conditions and a backend module for managing services and cookies.
Package info
github.com/PIT-Solutions-Private-Limited/pits_cookieconsent
Language:JavaScript
Type:typo3-cms-extension
pkg:composer/pits/pits_cookieconsent
Requires
- php: ^8.2
- typo3/cms-backend: ^13.4 || ^14.0
- typo3/cms-core: ^13.4 || ^14.0
- typo3/cms-extbase: ^13.4 || ^14.0
- typo3/cms-fluid: ^13.4 || ^14.0
- typo3/cms-frontend: ^13.4 || ^14.0
This package is auto-updated.
Last update: 2026-07-13 10:42:55 UTC
README
Compatible with TYPO3 v14 and v13.4 LTS · PHP 8.3+ (PHP 8.2 on TYPO3 v13)
GDPR-compliant cookie consent extension for TYPO3 v14. It renders a fully customisable consent banner and preferences modal on every page, lets visitors accept or reject cookies per category, and keeps tracking scripts blocked until consent is given.
The frontend widget is powered by the bundled vanilla Cookie Consent v3 JavaScript library (no jQuery required).
Features
- Consent banner (consent modal) and detailed preferences modal, both fully configurable: layout, position, button weighting/order and light/dark theme
- Cookie categories: necessary, analytics and marketing — visitors can opt in/out per category
- All labels and texts (title, description, buttons, privacy policy link) are configurable via TypoScript constants and translatable; the consent modal description supports rich text (RTE)
- "Accept all" button available in the preferences modal in addition to the consent modal, with its own configurable text
- Consent-based script blocking through the
cookieAccepted("<category>")TypoScript condition, e.g. to keep Google Analytics disabled until the visitor accepts the analytics category - Ships a site set (
pits/cookie-consent) for modern site configuration, plus a classic static TypoScript template - Optional "disable page interaction" mode that blocks the page until the visitor makes a choice
- Privacy policy link configurable to any TYPO3 page
- Backend module (Web > PITS Cookie Consent) for administrators to manage cookie services, scripts and cookie records
- Frontend plugin can be placed as a content element and configured via FlexForm
Requirements
| Dependency | Version |
|---|---|
| TYPO3 | 14 / 13.4 LTS |
| PHP | 8.3+ (8.2 on v13) |
Installation
Via composer:
composer require pits/pits_cookieconsent
Or install pits_cookieconsent from the TYPO3 Extension Repository (TER)
using the Extension Manager.
Setup
-
Include the extension's configuration in your site:
- Site set (recommended): add the
pits/cookie-consentset as a dependency in your site package'sconfig.yaml, or select PITS Cookie Consent under "Sets for this Site" in the site configuration module, or - Classic: include the static TypoScript template PITS Cookie Consent in your TypoScript template record.
- Site set (recommended): add the
-
Adjust the settings via TypoScript constants (
plugin.tx_pitscookieconsent.settings.*), e.g.:settings.general.theme,settings.general.disablePageInteractionsettings.consentModal.text.*(title, description, accept all / accept necessary / show preferences buttons)settings.consentModal.footer.privacyPolicy.*(link text and page uid)settings.consentModal.guiOptions.*andsettings.preferencesModal.guiOptions.*(layout, position, equalWeightButtons, flipButtons)settings.categories.*(necessary, analytics, marketing)
-
Alternatively insert the PITS Cookie Consent plugin as a content element and configure the same options through its FlexForm.
-
Load tracking scripts only after consent using the TypoScript condition:
[cookieAccepted("analytics")] page.999 = TEXT page.999.value = <!-- analytics snippet --> [global] -
Manage cookie services and script records in the backend module Web > PITS Cookie Consent (admin access).
Detailed documentation is available in the Documentation/ folder.
Changelog
4.0.0
- Compatibility with TYPO3 v14 (TYPO3 13.4 LTS remains supported)
- New "Accept all" button in the preferences modal with configurable text
(new database field
preferences_accept_all_text— run the database analyzer /composer exec typo3 database:updateschemaafter upgrading) - Consent modal description is now rendered through
lib.parseFunc_RTE, so rich text entered in the backend (links, formatting) is output correctly in the frontend - Fixed localization of consent (optin) records: the translation parent field is now configured correctly so translating the default-language record no longer fails in the DataHandler
- Minor frontend fixes: button positioning and removal of leftover console output
3.1.1
- Removed the legacy
Classes/Userfunccondition classes that extendedAbstractConditionMatcher(removed from TYPO3 core in v12) and caused a fatal error while building the dependency injection container - Consolidated the expression language providers; the TypoScript condition
function is
cookieAccepted("<category>")
3.1.0
- Added the expression language condition provider registration
3.0.0
- Compatibility with TYPO3 13.4 LTS and PHP 8.2 – 8.4
- New site set
pits/cookie-consentfor modern site configuration (the classic static TypoScript template is still available) - Script blocking now uses an expression language TypoScript condition with
per-category checks (finalized as
cookieAccepted("<category>")in 3.1.1) - Consent modal description supports rich text (RTE)
2.0.0
- Compatibility with TYPO3 12 LTS and PHP 8.1 – 8.3
- Frontend widget rewritten on top of the bundled vanilla Cookie Consent v3 library — jQuery is no longer required
- New consent banner and preferences modal with configurable layout, position, button weighting/order and light/dark theme
- Cookie categories (necessary, analytics, marketing) with per-category opt-in/opt-out
- New backend module (Web > PITS Cookie Consent) for managing cookie services, scripts and cookie records
- Optional "disable page interaction" mode
- All texts configurable via TypoScript constants / FlexForm and translatable
1.1.x (2019)
- Compatibility with TYPO3 9 LTS
- Fixed cookie handling for the current host
- Fixed opt-out button mismatch
- General bugfixes and dependency updates
1.0.0 (2018)
- Initial release: cookie consent banner with script blocking via the
CookiecheckTypoScript condition
License
GPL-2.0-or-later. The bundled Cookie Consent JavaScript library is MIT licensed — see its LICENSE.