Adjust the TypoScript constants (again, either in a sys_template record or in a file in your site package).
All constants are prepended with plugin.tx_cookieman.settings.
Property
resourcesBasePath
Data type
data-type-path
Default
EXT:cookieman/Resources
Example
EXT:mysitepackage/Resources
Description
Path to directory that holds the themes. Default enables the shipped demo themes. See
customization
how to create a new theme.
Property
theme
Data type
data-type-string
Default
bootstrap4-modal
Example
my-theme
Description
Name of the theme. It is used to extend the
resourcesBasePath
to create the full path to templates and assets.The shipped default themes are (each showcase the functionality a bit differently):
- `bootstrap3-banner`: needs Bootstrap 3; uses a text link "settings" instead of a button; shows "Accept all cookies" only after opening the settings; uses custom accordion CSS to show opened/closed state (+/x) and enhanced checkboxes
- `bootstrap3-modal`: needs Bootstrap 3, uses custom CSS on the "settings" button and the accordion to show opened/closed state (⯈/⯆), shows the checkboxes inside left of the accordion header
- `bootstrap4-modal`: needs Bootstrap 4, uses custom CSS on the "settings" button and the accordion to show opened/closed state (+/x), shows the checkboxes inside right of the accordion header
You can check out the
demo
or see thescreenshots
to get an idea.Of course you can use your own custom theme (see
customization
).
Property
links.dataProtectionDeclarationPid
Data type
data-type-page-id
Example
123
Description
page UID of data privacy statement page - the Cookieman modal will not be automatically opened on this page (see
when-is-it-shown
).
Property
links.dataProtectionDeclarationAnchor
Data type
data-type-string
Example
c456
Description
You can set an (optional) anchor (TYPO3-lingua "section") on the data privacy statement page.
Property
links.imprintPid
Data type
data-type-page-id
Example
123
Description
page UID of imprint page - the cookieman modal will not be automatically opened on this page (see
when-is-it-shown
).
Property
links.imprintAnchor
Data type
data-type-string
Example
c456
Description
You can set an (optional) anchor (TYPO3-lingua "section") on the imprint page.
Property
minify
Data type
t3tsref:data-type-boolean
Default
1
Description
Cookieman comes with both minified and regular stylesheets and JavaScripts for the demo themes.
It set to 1, the minified versions of the .css and .js files are used. You can set it to 0 for debugging purposes.
See a full TypoScript configuration-example
.
All configuration is prepended with plugin.tx_cookieman.settings.
Property
groups
Data type
array
Default
mandatory
Description
Holds the group configurations. A group contains several tracking objects.
By default, it only contains the 'mandatory' group, which includes the CookieConsent settings cookie. See a full TypoScript
configuration-example
.
Property
groups.<group-key>
Data type
array
Example
mandatory
Description
A single group. The group's key (name) should not contain spaces and non-ASCII characters.
It will be saved in the settings cookie and can be checked with JavaScript:
hasConsented('‹group-key›')
Property
groups.‹group-key›.preselected
Data type
t3tsref:data-type-boolean
Default
0 (not set)
Description
If enabled (1), the group's consent checkbox will be already checked when the popup opens.
The default group 'mandatory' has this set to 1.
Property
groups.‹group-key›.disabled
Data type
t3tsref:data-type-boolean
Default
0 (not set)
Description
If enabled (1), the group's consent checkbox will be disabled (cannot be changed).
The default group 'mandatory' has this set to 1.
Property
groups.‹group-key›.trackingObjects
Data type
array with numeric indices
Description
Holds a list of tracking object keys (numbered).
Example:
trackingObjects { 0 = CookieConsent 1 = fe_typo_user }
Property
groups.‹group-key›.respectDnt
Data type
t3tsref:data-type-boolean
Default
0 (not set)
Description
If set to 1, this group respects to the "Do-not-track" setting of your browser.
Property
groups.‹group-key›.showDntMessage
Data type
t3tsref:data-type-boolean
Default
0 (not set)
Description
If set to 1 and the "Do-not-track" setting of your browser is enabled, an additional message about that is shown inside the group.
Property
trackingObjects
Data type
array
Description
This array holds the tracking object configurations. The Cookieman extension already provides several preconfigured tracking objects:
- Cookie Consent (Cookieman's settings cookie)
- fe_typo_user
- Google Analytics
- Google Tag Manager
- Matomo
- Bing
Important
If you add a preconfigured tracking object, you must at least adapt the inject code to your needs!
The default group 'mandatory' only contains the tracking object CookieConsent settings cookie.
Property
trackingObjects.‹tracking-object-key›
Data type
array
Example
fe_typo_user
Description
A single tracking object configuration.
Example:
plugin.tx_cookieman.settings.trackingObjects { // 'Matomo' is the ‹tracking-object-key›: Matomo { // injected code, if consent is given: inject ( <script data-what="Matomo" src="/typo3conf/ext/cookieman/Resources/Public/Js/example-inject.js"></script> ) show { // set cookies, if consent is given: _pk_id { duration = 13 durationUnit = months type = cookie_http+html provider = Matomo } // etc. } } }
Property
trackingObjects.‹tracking-object-key›.inject
Data type
data-type-html-code
Example
<script src="/path/to/tracking-code.js"></script>
Description
Each HTML tag in here will be appended to the page when the respective group is consented. This can be <script>, <img> or anything else.
You can either use inline script or link to an external file (useful if a HTTP header Content-Security-Policy is set).
Property
trackingObjects.‹tracking-object-key›.show
Data type
array
Description
The actual rows of the table, each representing one "tracking item" (usually a cookie).
Property
trackingObjects.‹tracking-object-key›.show.‹tracking-item-key›
Data type
array
Example
_pk_id
Description
A single "tracking item" (e.g. the name of a cookie).
Property
trackingObjects.‹tracking-object-key›.show.‹tracking-item-key›.duration
Data type
data-type-positive-integer
Example
12
Description
The lifetime of the tracking object (only the "number" part).
Property
trackingObjects.‹tracking-object-key›.show.‹tracking-item-key›.durationUnit
Data type
data-type-string
Example
months
Description
The lifetime of the tracking object (only the "unit" part).
Property
trackingObjects.‹tracking-object-key›.show.‹tracking-item-key›.type
Data type
data-type-string
Example
cookie_http+html
Description
The type of tracking.
Possible keywords:
- `cookie_http+html`: a HTML (=HTTP+HTML) cookie, which is also readable from JavaScript
- `cookie_http`: an HTTP cookie
You can add your own types by adding a localization string type.‹your-type-key›.
Property
trackingObjects.‹tracking-object-key›.show.‹tracking-item-key›.provider
Data type
data-type-string
Example
Google
Description
The provider of the cookie or tracking object.