- Install
- Configuration (Basics)
- Module & Content-Element
- Styling & Customization
- Extend iFrame-Types
- Extend Cookie-Types
- Extended usage
Basic settings must be maintained via the config/config.yml
file.
ℹ The following values are set by default, they do not need to be added to the YML file again.
contao_cookiebar:
consider_dnt: false
anonymize_ip: true
lifetime: 63072000
storage_key: ccb_contao_token
page_templates:
- fe_page
iframe_types:
youtube:
- ce_youtube
vimeo:
- ce_vimeo
googlemaps:
- ce_html_googlemaps
- mod_html_googlemaps
Parameter | Description |
---|---|
consider_dnt |
Consider "Do not Track" browser setting |
anonymize_ip |
Anonymizes the visitor's IP address for each log entry using Symfony IP Address Anonymizer. |
lifetime |
Time in seconds until when the cookie bar settings apply. If the time has expired, the cookie bar is displayed again. If 0 is passed, the cookiebar will never be displayed again automatically and can only be triggered via the version within the cookiebar configuration. (Default: 63072000 = 2 years) |
storage_key |
The key used for localStorage |
page_templates |
An array with page templates which should be considered. Since version 1.8.2 all templates which start with fe_page_ are considered by default. |
iframe_types.* |
An array of iFrame-Types and the corresponding templates. By customizing this array, any type can be added (see Create own iFrame-Types) |
The anonymization of all entries can be triggered via the console as follows:
vendor/bin/contao-console cookiebar:anonymizeip
As of version
1.8
, IP addresses are automatically anonymized. The command is therefore only needed if the cookiebar was already in use before this version.