Linux 软件免费装
Banner图

nanoconsent

开发者 bastinet
更新时间 2026年11月2日 20:45
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

privacy gdpr cookie consent cookie banner consent mode

下载

0.1.3

详情介绍:

nanoconsent is a cookie consent banner that is 2,631 bytes gzipped in English — the whole thing, and under 2,750 bytes in every one of its eleven languages. Cookiebot's stack is 113,994 bytes. The sizes are measured, not claimed, and the measurement script ships with the source. What it does What you see in the admin What it is not Source code The banner is shipped minified, one file per language, as assets/nanoconsent.<lang>.min.js (en, fi, sv, da, no, de, nl, fr, es, it, pl). Its human-readable source is included as assets/nanoconsent.src.js (MIT) together with the texts in assets/nanoconsent.languages.json; each minified file is built from those two with esbuild and terser, nothing else.

安装:

  1. Install and activate.
  2. Open nanoconsent → Overview. The health check shows what runs on your front page.
  3. Open nanoconsent → Settings to choose categories and language. The preview on the right is the real banner.
To gate a script by hand, give it two attributes: <script type="text/plain" data-nc="analytics" src="…">.

屏幕截图:

  • Settings: categories, language and position, with the real banner as a live preview.
  • The banner on a site, here as a card in the corner. A bar across the bottom is the default.
  • "Choose" opens the categories. Only necessary cookies are on by default.

常见问题:

Does it work with Google Tag Manager?

Yes. The banner sends Consent Mode v2 defaults before the container loads, so tags that respect consent signals wait. If your tags ignore signals, turn on strict mode in Settings to gate the container itself.

Where is the consent log stored?

In a table in your own WordPress database. It is never sent anywhere. Download it as CSV from Overview or Settings when an auditor asks.

Does it block YouTube and other embeds?

Yes. Known embeds are replaced by a short notice with an "Allow and load" button until the visitor allows marketing cookies. The button opens the normal banner — consent is always given in the same dialog.

Is the banner modal?

No. It is a dialog the visitor can leave with Tab, and the page stays usable, as most regulators prefer. Focus moves into it on load and back out after the choice, Escape rejects, and every control works with the keyboard.

Is there a free version?

This is it, and it is complete. A paid licence compiles a build for your domain and language only and adds every jurisdiction's rule pack. Agencies get white label and monitoring.

更新日志:

0.1.3 0.1.2 0.1.1 0.1.0