Download the PHP package estouai/cookie-consent without Composer

On this page you can find all versions of the php package estouai/cookie-consent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cookie-consent

Cookie Consent

RGPD/GDPR-first cookie consent addon for Statamic 6.

It gives you a Shadow DOM cookie banner, per-site Control Panel settings, Google Consent Mode v2 defaults/updates, generic script and iframe gating for vendors like GTM, GA4, Meta Pixel, LinkedIn Insight Tag, TikTok Pixel, Hotjar, Clarity, and embeds, plus an append-only server-side consent log for proof of consent.

The public banner includes a small Powered by estou.ai attribution.

Features

Installation

If you install from a local path repository during development:

Then run:

Recommended template setup

Put defaults before any GTM/gtag.js snippet:

Put banner/button/scripts near the end of the page. Keep scripts outside {{ nocache }} so they work with full-measure static caching:

Tags

{{ cookie_consent }}

Renders the banner web component.

Suppress it manually:

{{ cookie_consent:defaults }}

Renders inline Consent Mode defaults. Use in <head> before GTM/gtag.js.

Defaults grant only required groups and deny non-essential groups:

This is what GTM Consent Settings / built-in consent variables read before the first pageview.

{{ cookie_consent:scripts }}

Loads the compiled JavaScript bundle. It registers custom elements, applies stored consent, updates Consent Mode, activates gated scripts/iframes, resolves content gates, handles Global Privacy Control, and logs decisions server-side.

{{ cookie_consent:button }}

Renders a floating button that reopens preferences.

{{ cookie_consent:allowed }} / {{ cookie_consent:denied }}

Client-side content gating by group:

When the addon is disabled for the current site, allowed renders directly and denied renders nothing.

{{ cookie_consent:groups }}

Render a privacy-policy cookie table:

Script and iframe gating

Add data-cookie-category to any vendor script or iframe. Use data-cookie-src instead of src for remote assets.

GA4 / gtag.js

Meta Pixel

LinkedIn Insight Tag

Embeds

Control Panel

Go to Tools → Cookie Consent.

Permission: manage cookie consent settings.

The screen edits:

Multi-site installs get a site switcher. Each site stores independent settings under:

If no CP settings exist, the addon uses config/cookie-consent.php defaults.

Consent Mode v2 and GTM

{{ cookie_consent:defaults }} writes default denied/granted values before GTM loads. {{ cookie_consent:scripts }} later sends gtag('consent', 'update', ...) after a visitor chooses.

Default mapping:

GTM tags should still use Consent Settings / Additional Consent Checks for the signals they require. The addon provides the signal state; GTM enforces it per tag.

2026 consent rules covered

Not implemented: IAB TCF v2.2+. Add a dedicated TCF CMP if you sell ad inventory programmatically through real-time bidding.

Consent log

Every accept/reject/save decision is sent to:

It appends one JSON line per decision:

Fields:

Query examples:

The endpoint is CSRF-exempt because static-cached pages may not have a CSRF cookie to send. It is throttled at 60 requests/minute per IP. Prune or rotate old logs according to your retention policy.

JavaScript API

Styling

The banner and button use Shadow DOM. Style via parts:

Configuration

Published config lives at:

Important keys:

Floating preferences button

button controls {{ cookie_consent:button }}:

When the banner is open, the button hides automatically so it cannot overlap the dialog. Before first consent, it also stays hidden while the banner is visible.

License

Proprietary. See LICENSE.md.


All versions of cookie-consent with dependencies

PHP Build Version
Package Version
Requires statamic/cms Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package estouai/cookie-consent contains the following files

Loading the files please wait ...