getdesigned/gd-cookieconsent

Getdesigned Cookie Consent extension

v1.0.4 2023-05-05 07:52 UTC

This package is auto-updated.

Last update: 2024-10-05 11:09:54 UTC


README

1 Features

  • Easy integrable cookie consent for your TYPO3 installation
  • Configure your cookie consent settings inside TYPO3 Backend (also possible for editors)
  • Fully customizable due to fluid template engine
  • Takes advantage of GDCC JS library

2 Usage

2.1 Installation

Installation using Composer

The recommended way to install the extension is using Composer.

Run the following command within your Composer based TYPO3 project:

composer require getdesigned/gd-cookieconsent

Installation as extension from TYPO3 Extension Repository (TER)

Download and install the extension with the extension manager module.

2.2 Setup

  1. Run npm install or yarn install or download JS dependencies from GitHub and place them wherever you want. There is also a copy of them placed at Resources/Public/Scripts if you will use TWB style template.
  2. Include the static TypoScript of the extension. Optional: If your templates are based on Twitter Bootstrap, add the TWB styles as well to get optimized CSS styles and default JS behaviour.
  3. If you are not using TWB style template, make sure you have included all necessary JS libraries (jQuery > 3, fg-cookie, gdcc-js). Those libraries will be delivered via npm dependency. Take a look into package.json.
  4. If you are not using TWB style template, initialize GDCC in your JavaScript once the DOM is ready. gdcc = new GdCookieConsent(debugMode);. The parameter debugMode is a boolean and triggers debug output of GDCC.
  5. Create some cookie category-, script- and cookie records on a sysfolder.
  6. Define sysfolder as storage pid in Typoscript constants – $plugin.tx_gdcookieconsent.settings.storagePid

3 Useful general information

  • The cookie consent itself is places per default at page.5. If this key is already in use, you can reference lib.cookieConsent at any location inside your page object.
  • Scripts, handled by this extension (script records with given script-content e.g. Google Analytics code) are placed at page.headerData.5. If this key is already in use, you can reference lib.cookieScripts at any location inside page.headerData or page.footerData.
  • It is possible to override the fluid templates via $plugin.tx_gdcookieconsent.view. settings in Typoscript constants.

4 Handling media (eg. YouTube videos)

TODO