PHPackages                             studiomitte/klaro - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. studiomitte/klaro

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

studiomitte/klaro
=================

Cookie consent solution following the GDPR by using the solution Klaro

3.1.0(4y ago)825.9k↓45.5%3[3 issues](https://github.com/studiomitte/klaro/issues)[2 PRs](https://github.com/studiomitte/klaro/pulls)GPL-2.0-or-laterPHPPHP ^7.4 || ^8.0

Since Dec 18Pushed 1y ago2 watchersCompare

[ Source](https://github.com/studiomitte/klaro)[ Packagist](https://packagist.org/packages/studiomitte/klaro)[ Docs](https://studiomitte.com)[ RSS](/packages/studiomitte-klaro/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (12)Used By (0)

TYPO3 Extension `klaro`
=======================

[](#typo3-extension-klaro)

This is another cookie consent solution using [klaro](https://klaro.kiprotect.com/).

Translations for the following languages are included: de, el, es, fr, hr, hu, it, nl, pl, ro, sk, sl, sr.

Usage
-----

[](#usage)

**1. Install extension**

Use either composer `composer require studiomitte/klaro` or install the extension via Extension Manager.

**2. Setup configuration in sites module**

Switch to the sites module and configure the extension. All configurations are described below.

**3. Adopt configuration to your needs**

Copy one of the JavaScript files in `EXT:klaro/Resources/Public/Example/` to your theme extension (or fileadmin), adopt it to your needs and define the path to the file in the site configuration.

Configuration
-------------

[](#configuration)

### Site Configuration

[](#site-configuration)

The sites module is used for the main configuration.

[![Sites module](Resources/Public/Documentation/sites-module.png)](Resources/Public/Documentation/sites-module.png)

The following options are available:

- `Enable`: Enable the klaro cookie consent management
- `Privacy Page ID`: Define the uid of the page with the privacy information
- `Path to the configuration file`: Define the path to the JavaScript file containing the klaro configuration
- `Path to the language file`: Use custom xlf files for localization.
- `Show full consent modal`: If set, the consent modal is shown when the page is rendered, instead of a small modal in the bottom of the page.
- `Path to the core Klaro JS file`: Use alternative version of klaro.
- `Style prefix`: Use a custom CSS.

### Klaro configuration

[](#klaro-configuration)

Klaro is using a JSON file for its configuration. An example:

```
var klaroConfig = {
    cookieExpiresAfterDays: 365,
    default: true,
    mustConsent: false,

    apps: [
        {
            name: 'googleTagManager',
            title: 'Google Tag Manager',
            purposes: ['analytics'],
            required: true
        },
        {
            name: 'googleAnalytics',
            title: 'Google Analytics',
            purposes: ['analytics'],
            cookies: [/^ga/i],
            callback: function (consent, app) {
                if (consent !== false) {
                    window.dataLayer = window.dataLayer || [];
                    window.dataLayer.push({'event': 'loadgtm-analytics'})
                }
            },
        }
    ],
};
if (typeof klaroConfigTranslations !== 'undefined') {
    for (var attr in klaroConfigTranslations) {
        klaroConfig[attr] = klaroConfigTranslations[attr];
    }
}
```

This example will load show 2 apps, **Google Tag Manager** which is always loaded and **Google Analytics**. The latter will be loaded by GTM and the callback must be used to actually load it only if the consent is given by the user.

See  for all configuration options

### Inline code

[](#inline-code)

To load inline code only after consent, use an example like below:

```
    (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
    new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
    j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
    'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document,'script','dataLayer','123456');
```

The `src` attribute is changed to `data-src` and the attribute `data-name="googleAnalytics"` which correlates with the name of the app above. The JavaScript is then only evaluated if the consent is given.

### Privacy Page

[](#privacy-page)

It is required that users can change their consent. This is possible by linking to the following pseudo urls.

Use the following pseudo-links

- Open the consent modal: `https://KLARO_CONSENT.com`
- Reset consent: `https://KLARO_RESET.com`

The urls will be replaced dynamically by a JavaScript link which will then trigger the consent modal.

### Styling

[](#styling)

If the configuration `Style prefix` is set, it is used as a prefix and you can apply your own CSS rules. The SCSS files in `EXT:klaro/Resources/Private/Scss/` should be copied to your frontend pipeline and modified to your needs.

Credits
-------

[](#credits)

This extension was created by Georg Ringer for [Studio Mitte, Linz](https://studiomitte.com) with ♥.

[Find more TYPO3 extensions we have developed](https://www.studiomitte.com/loesungen/typo3) that provide additional features for TYPO3 sites.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance23

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~97 days

Recently: every ~173 days

Total

9

Last Release

1567d ago

Major Versions

1.0.0 → 2.0.02020-01-28

2.2.1 → 3.0.02021-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d08c176686c8914d32c70d4af388887d738930fdfdf07c7ca9c841ad10ed683?d=identicon)[georgringer](/maintainers/georgringer)

---

Top Contributors

[![georgringer](https://avatars.githubusercontent.com/u/1905663?v=4)](https://github.com/georgringer "georgringer (39 commits)")[![elmarputz](https://avatars.githubusercontent.com/u/4445233?v=4)](https://github.com/elmarputz "elmarputz (1 commits)")

---

Tags

gdprtypo3-cms-extensiontypo3-extensioncookiesextensiontypo3gdprconsentdsgvo

### Embed Badge

![Health badge](/badges/studiomitte-klaro/health.svg)

```
[![Health](https://phpackages.com/badges/studiomitte-klaro/health.svg)](https://phpackages.com/packages/studiomitte-klaro)
```

###  Alternatives

[georgringer/gdpr

Make TYPO3 more compatible to GDPR

4657.1k](/packages/georgringer-gdpr)[codingfreaks/cf-cookiemanager

Manage cookies, scripts, and GDPR compliance on your Typo3 website with CodingFreaks Typo3 Cookie Manager. Customize cookie banners, streamline workflow, and enhance user experience. Ensure GDPR compliance and take control of cookie management with our Typo3 cookie management extension. Visit the official Typo3 Documentation page to learn more.

1625.8k](/packages/codingfreaks-cf-cookiemanager)[dirkpersky/typo3-dp_cookieconsent

Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)

36201.3k1](/packages/dirkpersky-typo3-dp-cookieconsent)[quellenform/t3x-iconpack

Provides an iconpack-registry for custom iconpacks.

1542.7k25](/packages/quellenform-t3x-iconpack)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
