- MODX 2
- MODX 3
- PHP 8.1
Quick start
Installation
- Back up your database,
core/,assets/, templates and existing consent records. - In MODX Package Manager, install the correct native transport:
cookieconsentmanager-1.0.8-pl5for MODX 2 orcookieconsentmanager3-1.0.8-pl7for MODX 3. - Open Extras → CookieConsentManager (the menu location can vary).
- On Services, make the intended categories visible, enable individual integrations and enter real service IDs.
- Review labels and translations on Texts, then Save.
- For audit logging, choose a writable server directory that is not accessible over HTTP.
A fresh installation does not automatically enable optional third-party services.
Recommended template integration
Place the uncached Assets snippet once in <head>:
<head>
[[!CookieConsentAssets]]
</head>Place the Banner snippet once before the closing </body>:
<body>
<!-- Site content -->
[[!CookieConsentBanner]]
</body>Add a settings button anywhere on the site:
<button type="button" data-cookie-settings-open>Cookie settings</button>Keep the calls uncached ([[!…]]). For Fenom templates, use the form your setup parses reliably, such as {'!CookieConsentAssets'|snippet} and {'!CookieConsentBanner'|snippet}, after verifying pdoTools/Fenom configuration.
Alternatively use one uncached [[!CookieConsent]] instead of the Assets/Banner pair. Do not mix the two approaches.
Move existing tracking scripts
Remove duplicate direct <script> tags or tag-manager integrations for services now controlled by CookieConsentManager. Scripts loaded independently cannot be blocked by the component.
Test the setup
Open a private browsing session and inspect the Network tab:
- In Strict mode, optional SDKs and iframes controlled by the component should not request third-party resources before permission.
- Allow Analytics and confirm the expected service loads.
- Reject optional categories, reload, and ensure denied services do not start.
- Open settings again using
data-cookie-settings-open. - Verify the server-side event in the consent log.
Подсказка
Check actual browser network traffic, not just the banner appearance or cookie values.
For removal and safe reinstall, see Uninstall and reinstall.
