`__ which triggers a
message inside the popup (in the “marketing” group) when enabled.
When is it shown?
-----------------
If consent has not been saved yet (aka our cookie *CookieConsent* is not
set) the popup/banner is shown. Exceptions are imprint and data privacy
statement pages - this is to follow the GDPR’s expectation that those
pages shall be easily and directly accessible and should not interfere
with a cookie consent banner.
Browser support
---------------
IE11 and up, fully responsive
Steps to implement
==================
Find out which tracking objects are used
----------------------------------------
You can check your page with an empty cookie storage with your browser
and see which cookies gets inserted in your browser. Or you can use a
service like https://www.cookieserve.com/ to fetch a page or sign up for
services that crawl your whole site regularly for cookies.
There might be connections made to external servers to access tracking
pixels or other content that warrant a user consent, too. This applies
to youtube (use youtube-nocookie.com) and CDNs (Google Fonts, Bootstrap
and other frontend libraries - recommendation: do not use external
connections at all if not necessary). Also other means for tracking
might be used, like HTML5 Web Storage (localStorage). It is a task for
the official Data Security Officer of the site to decide what needs to
be consented. If done correctly, you should be able to find a note about
used tracking services in the Data Privacy Statement of the site.
If you have control over how the tracking object is inserted you can
have *cookieman* handle that for you. Otherwise you can make the actual
inclusion of the tracking object dependant on a *cookieman*-API-call or
a presence of a certain string in *cookieman*\ ’s cookie “CookieConsent”
- this is recommended if you are managing several tags with Google
TagManager (set its trigger to “cookie ‹CookieConsent› contains ‹group
name, e.g. ”marketing"›).
Install cookieman
-----------------
Requirements
~~~~~~~~~~~~
- If you reimplement your own theme, it has no requirements at all
- for the example themes
- Bootstrap 3/4 CSS
- Bootstrap 3/4 JavaScript for *collapse*\ s and *modal*\ s
- jQuery
Installation
~~~~~~~~~~~~
Get it from packagist https://packagist.org/packages/dmind/cookieman via
composer
.. raw:: html
composer req dmind/cookieman
… or download it from https://extensions.typo3.org/extension/cookieman/.
Each version **only supports** either TYPO3v8/v9/v10. This might be a
bit confusing but makes development and testing easier.
Integration
-----------
Include the shipped TypoScript as usual (either by including it from a
sys_template [“Cookieman”] or by referencing the files from your site
package).
TypoScript **constants**
~~~~~~~~~~~~~~~~~~~~~~~~
Adjust the TypoScript constants (again, either in a sys_template record
or in a file in your site package):
**plugin.tx_cookieman.settings.** …
*resourcesBasePath*: String (default: EXT:cookieman/Resources)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
see below (“Create new theme”) - the default enables the shipped demo
themes
*theme*: String (default: bootstrap4-modal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the theme name. These default themes are shipped:
**bootstrap3-banner:**
.. figure:: Documentation/Images/bs3-banner-initial.png
:alt: bootstrap3-banner
bootstrap3-banner
.. figure:: Documentation/Images/bs3-banner-opened.png
:alt: bootstrap3-banner
bootstrap3-banner
**bootstrap3-modal:**
.. figure:: Documentation/Images/bs3-modal-initial.png
:alt: bootstrap3-modal
bootstrap3-modal
.. figure:: Documentation/Images/bs3-modal.png
:alt: bootstrap3-modal
bootstrap3-modal
**bootstrap4-modal:**
.. figure:: Documentation/Images/bs4-modal-initial.png
:alt: bootstrap4-modal
bootstrap4-modal
.. figure:: Documentation/Images/bs4-modal-colors.png
:alt: bootstrap4-modal
bootstrap4-modal
*links*.\ *dataProtectionDeclarationPid*: int
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
page UID of data privacy statement page - the *cookieman* modal will
not be automatically opened on this page (See “When is it shown?”)
*links*.\ *dataProtectionDeclarationAnchor*: ?String
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
an anchor (TYPO3-lingua “section”) on that page, if needed
*links*.\ *imprintPid*: int
^^^^^^^^^^^^^^^^^^^^^^^^^^^
page UID of imprint page - the *cookieman* modal will not be
automatically opened on this page (See “When is it shown?”)
*links*.\ *imprintAnchor*: ?String
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
an anchor (TYPO3-lingua “section”) on that page, if needed
*minify*: int(0,1) (default: 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If *1*, includes the minified versions of .css and .js
TypoScript **setup**
~~~~~~~~~~~~~~~~~~~~
See a full TypoScript configuration example below.
**plugin.tx_cookieman.settings.** …
*groups*: Array (default: example groups - you should override that, see below for a full TypoScript example)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
holds the group configurations. A group contains several tracking
objects.
*groups*.\ *‹group key›*: Array
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
a single group. The key should not contain spaces and non-ASCII
characters. It will be saved in the settings cookie and can be
checked with JavaSript: hasConsented(‘‹group key›’)
*groups*.\ *‹group key›*.\ *preselected*: int(0,1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If *1*, the groups consent checkbox will be already checked when the
popup opens.
*groups*.\ *‹group key›*.\ *disabled*: int(0,1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If *1*, the checkbox will be disabled (cannot be changed)
*groups*.\ *‹group key›*.\ *trackingObjects*: Array
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
holds a list of tracking object **keys**
Example:
.. raw:: html
trackingObjects {
0 = CookieConsent
1 = fe_typo_user
}
*groups*.\ *‹group key›*.\ *respectDnt*: int(0,1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If *1*, this group pays respect to the `“Do-not-track” setting of the
browser `__.
*groups*.\ *‹group key›*.\ *showDntMessage*: int(0,1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If *1* AND the `“Do-not-track” setting of the
browser `__ is enabled, a
message about that is shown.
*trackingObjects*: Array (default: example tracking objects, you can use them, but override its ``.inject``)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
holds the tracking object configurations. Have a look at the included
examples here
https://github.com/dmind-gmbh/extension-cookieman/tree/master/Configuration/TypoScript/TrackingObjects
*trackingObjects*.\ *‹tracking object key›*: Array
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
a single tracking object configuration
*trackingObjects*.\ *‹tracking object key›*.\ *inject*: String
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
everything in here will be appended to the page when the respective
group is consented. This can be