PHPackages                             jordanbeattie/craftcms-cookie-consent - 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. jordanbeattie/craftcms-cookie-consent

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

jordanbeattie/craftcms-cookie-consent
=====================================

Consent manager for Google Tag Manager

1.0.1(2y ago)029MITTwig

Since Jan 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jordannbeattie/craftcms-cookie-consent)[ Packagist](https://packagist.org/packages/jordanbeattie/craftcms-cookie-consent)[ RSS](/packages/jordanbeattie-craftcms-cookie-consent/feed)WikiDiscussions master Synced 1mo ago

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

Cookie Consent
==============

[](#cookie-consent)

This plugin will add a popup to the bottom-right of the page informing users that the website uses cookies and allows them to enable/disable advertisement and analytics cookies.

Requirements
------------

[](#requirements)

The project must be using AlpineJS, TailwindCSS and CraftCMS.

Installation
------------

[](#installation)

Add the below hook to your `` element.

```
{% hook 'cookie-consent' %}

```

Add the following to your `tailwind.config.js`

```
content: [
    ...
    './vendor/jordanbeattie/craftcms-cookie-consent/**/*.twig'
],

```

Customisation
-------------

[](#customisation)

### Style

[](#style)

You can use the following IDs to target individual elements in the popup

- `CookieConsent`
- `CookieConsent__Wrapper`
- `CookieConsent__DefaultContent`
- `CookieConsent__Headline`
- `CookieConsent__Copy`
- `CookieConsent__Buttons`
- `CookieConsent__AcceptButtons`
- `CookieConsent__AcceptButton`
- `CookieConsent__NecessaryOnlyButton`
- `CookieConsent__Moreutton`
- `CookieConsent__DetailContent`
- `CookieConsent__Options`
- `CookieConsent__Necessary`
- `CookieConsent__Analytics`
- `CookieConsent__Advertisement`
- `CookieConsent__PolicyLink`
- `CookieConsent__DetailButtons`
- `CookieConsent__SubmitButton`
- `CookieConsent__LessButton`

### Content

[](#content)

The majority of the content within the popup can be customised via a config file. Running the below command will create a `coookie-consent.php` file in your `config` directory which you can customise.

```
php craft cookie-consent/config

```

Usage
-----

[](#usage)

In your Twig templates, you can use the following function to check whether a user has accepted analytics or advertisement cookies.

```
craft.cookieConsent.getConsent()

```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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 ~5 days

Total

2

Last Release

840d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/386767c01607b6d47904c71fd4f101c309183b826e047b32c41a8c76de4e8720?d=identicon)[jordannbeattie](/maintainers/jordannbeattie)

---

Top Contributors

[![jordannbeattie](https://avatars.githubusercontent.com/u/6815944?v=4)](https://github.com/jordannbeattie "jordannbeattie (12 commits)")

---

Tags

cmsCraftcraftcmscraft-plugin

### Embed Badge

![Health badge](/badges/jordanbeattie-craftcms-cookie-consent/health.svg)

```
[![Health](https://phpackages.com/badges/jordanbeattie-craftcms-cookie-consent/health.svg)](https://phpackages.com/packages/jordanbeattie-craftcms-cookie-consent)
```

###  Alternatives

[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[pennebaker/craft-architect

CraftCMS plugin to generate content models from JSON/YAML data.

72148.5k5](/packages/pennebaker-craft-architect)

PHPackages © 2026

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