npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

strapi-plugin-cookie-consent

v1.0.3

Published

GDPR cookie consent logging for Strapi v5 — Google Consent Mode V2, CNIL-compliant, IP anonymization, auto-configured public POST endpoint

Downloads

506

Readme

strapi-plugin-cookie-consent

npm version License: MIT

GDPR consent proof logging for Strapi v5 — the backend of a free, open-source cookie consent stack (Google Consent Mode V2, CNIL-compliant).

This plugin stores every consent choice made on your frontend in a Strapi collection, giving you the proof-of-consent record GDPR audits ask for. It pairs with the @isomorph-agency/cookie-consent React package (banner, preferences modal, GCM V2 signals), but works with any frontend able to send a POST request.

Built and maintained by ISOMORPH — a web development agency based in Paris and Toulon, France.

Using Strapi v4? Install strapi-plugin-cookie-consent-v4 instead.

What it does

  • Auto-creates a cookie-consents collection on first start — no manual content-type setup
  • Auto-configures permissions: POST is public (consent logging), GET is admin-only
  • Rate limiting on the public endpoint (10 req/IP/min) to prevent abuse
  • Stores anonymized data only: session hash, anonymized IP (first 3 octets), no personal data

Installation

npm install strapi-plugin-cookie-consent
// config/plugins.ts
export default {
  'cookie-consent': { enabled: true },
};

Restart Strapi. The collection and permissions are created automatically.

API

POST /api/cookie-consents (public)

Log a consent choice. Called automatically by the React package, or manually from any frontend:

{
  "data": {
    "sessionId": "a1b2c3…",
    "necessary": true,
    "analytics": false,
    "advertising": false,
    "functional": true,
    "gcmVersion": "v2",
    "consentDate": "2026-07-11T10:00:00.000Z",
    "expiryDate": "2027-08-11T10:00:00.000Z",
    "userAgent": "Mozilla/5.0 …",
    "ipAnonymized": "192.168.1.xxx",
    "source": "mysite.com",
    "action": "custom"
  }
}

All inputs are validated server-side. Invalid payloads are rejected.

GET /api/cookie-consents (admin only)

Browse the consent log from the Strapi admin or via an authenticated API token — your GDPR proof-of-consent record.

Collection schema

| Field | Type | Notes | |-------|------|-------| | sessionId | string | anonymous session hash | | necessary | boolean | always true | | analytics | boolean | maps to analytics_storage | | advertising | boolean | maps to ad_storage + ad_user_data + ad_personalization | | functional | boolean | maps to functionality_storage | | gcmVersion | string | "v2" | | consentDate / expiryDate | datetime | expiry = consent + 13 months (CNIL) | | userAgent | string | | | ipAnonymized | string | first 3 octets only — never the full IP | | source | string | site domain (multi-site friendly) | | action | enum | accept_all / refuse_all / custom |

Complete stack

| Package | Description | |---------|-------------| | @isomorph-agency/cookie-consent | React banner + preferences modal + GCM V2 + blocked-content facades | | strapi-plugin-cookie-consent | This plugin (Strapi v5) | | strapi-plugin-cookie-consent-v4 | Strapi v4 version |

Full documentation, contributing guide and issue tracker: github.com/agenceisomorph/cookie-consent

Compliance

  • GDPR: proof-of-consent logging, anonymized data only, 13-month auto-expiry
  • CNIL (French DPA): 13-month expiry, anonymized IP, consent granularity per category
  • Logging is fire & forget on the frontend side — never blocks the user experience

License

MIT — free for personal and commercial use.

Built with care by ISOMORPH.