PHPackages                             lekoala/silverstripe-cookieconsent - 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. lekoala/silverstripe-cookieconsent

ActiveSilverstripe-vendormodule

lekoala/silverstripe-cookieconsent
==================================

Integrate cookieconsent.com in SilverStripe

1.1.0(5y ago)21.2k↓100%1[1 issues](https://github.com/lekoala/silverstripe-cookieconsent/issues)MITPHPPHP &gt;=7.2

Since Feb 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/lekoala/silverstripe-cookieconsent)[ Packagist](https://packagist.org/packages/lekoala/silverstripe-cookieconsent)[ GitHub Sponsors](https://github.com/lekoala)[ RSS](/packages/lekoala-silverstripe-cookieconsent/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (4)Used By (0)

SilverStripe CookieConsent module
=================================

[](#silverstripe-cookieconsent-module)

[![Build Status](https://camo.githubusercontent.com/73a8807ae1dc0b6cd94896b90122e1703f4c294bdd460256b80c3d207fd1a525/68747470733a2f2f7472617669732d63692e636f6d2f6c656b6f616c612f73696c7665727374726970652d636f6f6b6965636f6e73656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/lekoala/silverstripe-cookieconsent/)[![scrutinizer](https://camo.githubusercontent.com/5886c92f02d11f9dfd2d4968efd10d498590b4315c91604a412b96d036601f70/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c656b6f616c612f73696c7665727374726970652d636f6f6b6965636f6e73656e742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/lekoala/silverstripe-cookieconsent/)[![Code coverage](https://camo.githubusercontent.com/0cf9e8399a7d17cec9adbc4fd052913c089fe3004d0fa7bb42b182b042c5e669/68747470733a2f2f636f6465636f762e696f2f67682f6c656b6f616c612f73696c7665727374726970652d636f6f6b6965636f6e73656e742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lekoala/silverstripe-cookieconsent)

Intro
-----

[](#intro)

Yet another cookie consent module. This one integrates  which allow you to have various layouts (including blocking layouts) and load/allow cookies per type.

NOTE: even if it has the same name (and the same version number!!), it is NOT the cookieconsent from

How it works
------------

[](#how-it-works)

When you require your scripts, you should add their type in order to load them according to user preference:

The four types are :

- strictly-necessary
- functionality
- tracking
- targeting

And they will be rendered in something like this. Please note the `text/plain` type that prevents the script for being executed. This is what you should do if you include your scripts manually.

```

```

or for inline scripts

```

console.log("i'm a tracking script");

```

If you use the Requirements api, in order to specify this extra attribute, you need a `Requirements_Backend` that supports it. This is delegated to my [defer backend module](https://github.com/lekoala/silverstripe-defer-backend).

This is how you would add a tracking script with the updated requirements api

```
Requirements::javascript('myscript',['cookieconsent' => 'tracking'])
```

For php cookies
---------------

[](#for-php-cookies)

If you set cookies on the serverside, you can check the `CookieConsent::isAllowed` method or use the `CookieConsent::setCookie` helper.

Options
-------

[](#options)

```
LeKoala\CookieConsent\CookieConsent:
  # use local js or cdn js
  use_cdn: false
  # class name of your privacy page. leave blank for default
  privacy_notice_class: 'PrivacyNoticePage'
  opts:
    # simple, headline, interstitial, standalone
    notice_banner_type: "interstitial"
    # implied, express => should really by express for GDPR
    consent_type: "express"
    # light, dark
    palette: "dark"
    change_preferences_selector: "#cookieconsent-preferences"
```

Check compliance
----------------

[](#check-compliance)

You can use cookiebot the check compliance

This can also helps customers to realize the necessity of this module

Compatibility
-------------

[](#compatibility)

Tested with 4.6 but should work on any ^4 projects

Maintainer
----------

[](#maintainer)

LeKoala -

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

1917d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/701d0bd1837aa291814dafee750a02471e7e0d20749626350231ffd3bfec0ec1?d=identicon)[lekoala](/maintainers/lekoala)

---

Top Contributors

[![lekoala](https://avatars.githubusercontent.com/u/250762?v=4)](https://github.com/lekoala "lekoala (6 commits)")

---

Tags

cookieconsentsilverstripesilverstripecmscookiesmodulecookieconsent

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lekoala-silverstripe-cookieconsent/health.svg)

```
[![Health](https://phpackages.com/badges/lekoala-silverstripe-cookieconsent/health.svg)](https://phpackages.com/packages/lekoala-silverstripe-cookieconsent)
```

###  Alternatives

[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39279.9k22](/packages/lekoala-silverstripe-cms-actions)[axyr/silverstripe-adminlogin

Use a custom login screen to log in to the admin section

165.8k](/packages/axyr-silverstripe-adminlogin)

PHPackages © 2026

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