Download the PHP package madj2k/t3-klarokratie without Composer
On this page you can find all versions of the php package madj2k/t3-klarokratie. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download madj2k/t3-klarokratie
More information about madj2k/t3-klarokratie
Files in madj2k/t3-klarokratie
Package t3-klarokratie
Short Description Includes Klaro! Consent-Manager into TYPO3. Completely file-based configuration for versioning without having to take care of database-entries. This extension automatically adds a consent-overlay to embedded YouTube- and Vimeo-Videos. It also comes with a ready-to-use integration for Google Analytics / Google Tag Manager and etracker.
License GPL-2.0+
Homepage https://www.steffenkroggel.de
Informations about the package t3-klarokratie
Klarokratie
Includes Klaro! consent-manager into TYPO3. Completely file-based configuration for versioning without having to take care of database-entries.
This extension automatically adds a consent-overlay to embedded YouTube- and Vimeo-Videos.
More information on Klaro! can be found here:
UPGRADE v14 - Breaking Changes
- The option
etracker.blockScriptBeforeConsentis no longer available. Per default the etracker-scripts are now only loaded when consent is explictly given. However to track users with etrackers cookieless-mode regardless of the given consent just includeEXT:klarokratie/Resources/Public/Config/Includes/EtrackerCookieless.js. This compliant with GDPR, see: https://www.etracker.com/en/consent-free-and-legally-compliant/
Installation & Basic Configuration
Simply install the extension.
After installation you can define the path to your Klaro!-configuration in your site configuration (config/sites/<site>/config.yaml).
You can also use extension-paths if you use a site-package.
Alternatively you can use this older notations (working, but discouraged for the sake of having clear namespaces):
If you do not define any configuration or custom CSS a default configuration with the default styles is used. However, you can explicitly disable the klaro! Consent Manager by using the following setting:
or - accordingly the discouraged (!!!) older versions -
Modular Configuration using Includes
Starting with the latest version, the Klarokratie extension supports a modular approach to configuration:
- You can define a base configuration file (e.g. KlaroConfigMinimal.js)
- Optionally, you can then provide one or more additional config-files ("includes") that are merged into the base configuration.
This allows you to separate reusable parts and keep your base config clean and minimal.
Example setup:
All configuration-scripts are delivered as a single combined JavaScript file to reduce HTTP requests. If no includes are defined, only the base config is loaded without merging. This is the default behavior. The extension already comes with several useful includes for common services:
- etracker
- etracker Cookieless & Consent Free (compliant with GDPR, see: https://www.etracker.com/en/consent-free-and-legally-compliant/)
- Meta Pixel / Facebook Pixel
- Google Ads
- Google Analytics
- Google Analytics Cookieless & Consent Free (please be aware that this NOT compliant with GDPR)
- Google Maps
- HCaptcha
- Vimeo
- YouTube
These are located in:
You can use them directly or copy and customize them in your own site package.
Note: if you use includes, the EXT:klarokratie/Resources/Public/Config/KlaroConfigMinimal.js is used instead of EXT:klarokratie/Resources/Public/Config/KlaroConfig.js
You can also override the default translations. You can find an example file here.
Just copy it to your site-extension and set your own translations. You can use it like so:
Advanced Configuration
Optional: Use Tracking-Code insertion for etracker or Google Analytics
Tracking-code insertion for etracker or Google Analytics is configured via site configuration (config/sites/<site>/config.yaml).
An enabled tracking-code-insertion would either include the current etracker-tracklet or the current Google Analytics tracking code.
Example configuration for etracker:
Example configuration for Google Analytics:
The following tracking options are available:
etracker
enable: Enables etracker code insertion.secureCode: The secure code of your etracker account.blockCookiesOnPageLoad: Enables blocking cookies on page load. This should be active according to GDPR.respectDoNotTrack: Respects DoNotTrack in the browser. This should be active according to GDPR.doNotUseSessionStorage: Disables Session Storage. Warning: this has a negative impact on page and tracking performance.
Google Analytics
enable: Enables Google Analytics code insertion.useTagManager: Uses Google Tag Manager instead of the Google Analytics tag directly.tagId: The tag ID of your Google Analytics or Google Tag Manager account.
There are also Klaro!-configuration-files for etracker and Google Analytics included. These files handle the cookie-opt-in for your tracking according to GDPR. You can use them by setting the desired file in your site configuration:
or
If you have a multi-site setup, define different tracking-options in each site's config.yaml.
For backwards compatibility, older site-configuration key names are still supported, but discouraged.
Use the klarokratie namespace for new projects:
Optional: Categories for etracker (et_areas)
If you use etracker there is a lib-object included which you can use to set hierarchical categories.
IMPORTANT: In order to take effect, you have to use COA-objects in your lib-override-TypoScript!
Below you find a hypothetical example that sets the current domain as first category and as category of the second level the project-name is used that is fetched from the page-properties of the current page via the field "tx_example_project" as reference to table "tx_example_domain_model_project". The example below would result in the following category-value (et_areas) for etracker:
Re-Open Modal
If you want to show a menu-item on your website to re-open the modal, this extension adds a field tx_klarokratie_open_modal to the pages-table including the corresponding TCA-configuration for convenient switching using the page properties in the backend. You can use this field to render your menu accordingly and add the required JS to re-open the modal instead of a normal link to the page.
Example:
Custom CSS
It is possible to include a custom CSS-file for adaption the Klaro! overlay to your needs (see second line above). The CSS partly uses variables which you can override in your custom CSS:
Plain CSS
Example with SASS and Bootstrap
Testing
-
Single Method
-
Single File
- All files
Generate the documentation as HTML
Execute in the extension-root: