PermitoLive demo, core and Pro.
The first section runs the free core (MIT). Every section after it is produced by the Pro packages themselves. The themes and layouts run in your browser. The catalog, the cookie table and the scanner report are rendered on the server, so what reaches your browser is the finished HTML and not the packages. The last three sections before the consent log (GTM container check, monitoring many client sites, catalog changes per project) show recorded output of the command-line tools.
The banner preview uses its own in-memory storage. Nothing you click here changes the consent of this site.
Core
Core (free, MIT)Banner, dialog and gates.
The banner, the settings dialog and the gates belong to the free core, @permitojs/react. Decide in the banner, then watch the gate and the video below react. The decision is kept in memory only and is gone on reload. It expires after 365 days (maxAgeDays), and the result shows whether your browser sends the Global Privacy Control signal.
Script tag
Without React (free, MIT)One script tag, same banner.
Since 0.3.0 the banner and the settings dialog also run without React: as a script tag for WordPress, Webflow or plain HTML, or via createConsentUI from @permitojs/core/ui. The frame below runs that framework-free code. The decision is kept in memory only and is gone on reload.
The same banner on any website
<script type="application/json" id="permito-config">
{ "config": { "consentVersion": "2026-10", "categories": [
{ "id": "necessary", "required": true },
{ "id": "statistics" }, { "id": "marketing" } ] } }
</script>
<script src="/vendor/permito.global.js" data-config="#permito-config"></script>
<a href="#" data-permito-open>Cookie settings</a>No decision yet. Choose in the banner.
Themes
Themes and layoutsLive, in the frame below.
Pick a theme, a mode and a layout, then decide in the banner. Changing the layout shows the banner again. The decision is kept in memory only and is gone on reload.
Catalog
Service catalogFacts with a source.
The catalog holds 71 services. 8 are shown in full below. Each entry states what the provider documents, with the source page and the date it was read.
Google Analytics 4Google, Ireland
- Provider
- Hosting
- Run by the provider
- Legal entity
- Google Ireland Limited, Ireland
- Third countries
- United States
- Data Privacy Framework
- Google LLC, EU-US listed, Swiss-US listed
- Purpose
- Measurement of website usage with Google Analytics 4.
Cookies and storage
| Name | Type | Duration | Description |
|---|---|---|---|
| _ga | cookie | 2 years | According to Google, used to distinguish users. |
| _ga_<container-id> | cookie | 2 years | According to Google, used to persist session state. |
Source: https://support.google.com/analytics/answer/11397207. retrieved 2026-10-04.
Matomo On-PremiseInnoCraft, Self-hosted, runs on your infrastructure
- Provider
- InnoCraft
- Hosting
- Self-hosted, runs on your infrastructure
- Legal entity
- No provider receives data from this setup, so entity and transfers do not apply.
- Purpose
- Web analytics: Matomo records visits to the operator's website. The software runs on the operator's infrastructure.
Cookies and storage
| Name | Type | Duration | Description |
|---|---|---|---|
| _pk_id | cookie | 13 months | Stores a unique visitor ID to recognize returning visitors. |
| _pk_ses | cookie | 30 minutes | Session cookie that temporarily stores data for the visit. |
| _pk_ref | cookie | 6 months | Stores attribution information, i.e. the referrer that brought the visitor to the website. |
| _pk_cvar | cookie | 30 minutes | Session cookie that temporarily stores custom variables for the visit. |
| _pk_testcookie | cookie | Immediate expiry | Checks whether the browser supports cookies (according to Matomo, for Internet Explorer). |
| matomo_sessid | cookie | 14 days | Optional. A nonce to help prevent CSRF issues when using the opt-out feature. |
| mtm_consent_removed | cookie | 30 years | Optional. Indicates that a visitor opted out of Matomo tracking. |
| mtm_cookie_consent | cookie | 30 years | Optional. Records the visitor's consent to Matomo tracking. |
| _pk_hsr | cookie | 30 minutes | Optional. Stores heatmap and session recording data. |
| _pk_uid | cookie | 13 months | Optional, not default. Enables cross-domain visitor recognition. |
| MatomoAbTesting | localStorage | Not stated | Optional. Stores information for Matomo A/B Testing in local storage. Matomo states no expiry. |
Source: https://matomo.org/faq/general/faq_146/. retrieved 2026-10-04.
Meta PixelMeta, Ireland
- Provider
- Meta
- Hosting
- Run by the provider
- Legal entity
- Meta Platforms Ireland Limited, Ireland
- Third countries
- United States
- Data Privacy Framework
- Meta Platforms, Inc., EU-US listed, Swiss-US listed
- Purpose
- JavaScript code that, according to Meta, tracks visitor activity on a website to measure the effectiveness of advertising and analyze conversion funnels. According to Meta, the Pixel relies on Facebook cookies to match website visitors to their Facebook accounts.
Cookies and storage
| Name | Type | Duration | Description |
|---|---|---|---|
| _fbp | cookie | Not stated | Meta names this cookie as the place where the Meta browser ID is stored, under the website's domain. Meta states no duration in the documentation retrieved (including its documentation on managing fbp and fbc). |
| _fbc | cookie | Not stated | Meta names this cookie as the place where the Meta click ID is stored. Meta states no duration for the cookie set by the Pixel. For a _fbc cookie set by the website's own server, Meta's Conversions API documentation recommends a duration of 90 days. |
Source: https://developers.facebook.com/docs/meta-pixel/get-started/. retrieved 2026-10-04.
YouTube (youtube-nocookie.com)Google, Ireland
- Provider
- Hosting
- Run by the provider
- Legal entity
- Google Ireland Limited, Ireland
- Third countries
- United States
- Data Privacy Framework
- Google LLC, EU-US listed, Swiss-US listed
- Purpose
- Embedding of YouTube videos in privacy-enhanced mode through youtube-nocookie.com.
Cookies and storage
The provider documents no cookies or storage entries.
Source: https://support.google.com/youtube/answer/171780. retrieved 2026-10-04.
TWINT (Webshop)TWINT AG, Switzerland
- Provider
- TWINT AG
- Hosting
- Run by the provider
- Legal entity
- TWINT AG, Switzerland
- Third countries
- None named by the provider
- Data Privacy Framework
- Not checked
- Purpose
- Payment method in the web shop. According to TWINT, TWINT is integrated via the merchant's payment service provider or a plug-in of the shop system; payment is completed in the TWINT app via the Web2App switch.
Cookies and storage
The provider documents no cookies or storage entries.
Source: https://www.twint.ch/en/business-customers/products/twint-for-online-shops/. retrieved 2026-10-04.
Datatrans Payment Page / LightboxDatatrans AG, Switzerland
- Provider
- Datatrans AG
- Hosting
- Run by the provider
- Legal entity
- Datatrans AG, Switzerland
- Third countries
- None named by the provider
- Data Privacy Framework
- Not checked
- Purpose
- Payment processing via the Datatrans Payment Page in redirect or lightbox mode. According to Datatrans, the lightbox displays an iframe on top of the merchant page; on mobile devices it switches to redirect mode automatically.
Cookies and storage
The provider documents no cookies or storage entries.
Source: https://docs.datatrans.ch/docs/redirect-lightbox. retrieved 2026-10-04.
etracker AnalyticsJustRelate Deutschland GmbH, Germany
- Provider
- JustRelate Deutschland GmbH
- Hosting
- Run by the provider
- Legal entity
- JustRelate Deutschland GmbH, Germany
- Third countries
- None named by the provider
- Data Privacy Framework
- Not checked
- Purpose
- Web analytics: etracker Analytics records the use of the operator's website. According to etracker, data is processed and stored exclusively in Germany.
Cookies and storage
| Name | Type | Duration | Description |
|---|---|---|---|
| et_allow_cookies | localStorage | 480 days | Signals whether etracker may set cookies via API call. Set when _etracker.enableCookies() is called and deleted on disableCookies(). |
| et_oi_v2 | localStorage | 50 years (value "no"), 480 days (value "yes") | Implements the objection function (opt-out) and serves an opt-in where used. |
| et_oi_services | localStorage | 720 days | Stores the user's choice (acceptance or refusal) per category or provider. |
| _et_coid | localStorage | 720 days (configurable) | Used to recognize users by means of a virtual expiry timestamp. |
| isSdEnabled | cookie | 24 hours | Indicates whether scroll depth measurement is active. |
| et_scroll_depth | sessionStorage | Session | Buffers scroll measurement data for ScrollMap reports. Set when scroll tracking is enabled. |
| et_cssSelectors | sessionStorage | Session | Cache for the configuration of events defined by CSS selectors. |
| et_tagManagerEntries | sessionStorage | Session | Cache for the trigger configuration of the etracker Tag Manager. |
| et_tagManagerVars | sessionStorage | Session | Cache for the variable configuration of the etracker Tag Manager. |
Source: https://help.etracker.com/en/article/cookies-used/. retrieved 2026-10-04.
Friendly CaptchaFriendly Captcha GmbH, Germany
- Provider
- Friendly Captcha GmbH
- Hosting
- Run by the provider
- Legal entity
- Friendly Captcha GmbH, Germany
- Third countries
- None named by the provider
- Data Privacy Framework
- Not checked
- Purpose
- Bot detection on forms. According to Friendly Captcha, the data is only used to identify and handle potential bots and risks.
Cookies and storage
The provider documents no cookies or storage entries.
Source: https://friendlycaptcha.com/legal/privacy-end-users/. retrieved 2026-10-04.
63 more services, by name
Every entry has the same fields as the ones above.
- Adobe Fonts
- Awin Affiliate-Tracking (MasterTag)
- Brevo
- Bunny Fonts
- Calendly (embedded scheduling page)
- Cloudflare Turnstile
- Cloudflare Web Analytics
- Criteo OneTag
- econda Analytics
- Facebook (social plugins, embedded posts)
- Fathom Analytics
- Google Ads Conversion Tracking / Remarketing
- Google Fonts
- Google Maps
- Google reCAPTCHA
- Google Tag Manager
- Hotjar
- HubSpot
- Infomaniak Newsletter
- Instagram (embedded post)
- Intercom Messenger
- Klarna On-site Messaging / Checkout-Widget
- Klaviyo (onsite tracking and forms)
- LinkedIn Insight Tag
- Mailchimp
- Mapbox GL JS
- Mapp Intelligence
- Matomo Cloud
- Microsoft Advertising Universal Event Tracking (UET)
- Microsoft Clarity
- Mollie Components / Checkout
- Mouseflow
- OpenStreetMap (Tile-Server)
- PayPal
- Payrexx
- Pinterest Tag
- Piwik PRO Analytics Suite
- Plausible Analytics
- Plausible Community Edition
- PostFinance Checkout
- PostHog (self-hosted)
- PostHog Cloud
- ProvenExpert Bewertungssiegel
- Sentry
- Sentry (self-hosted)
- Shopware 6
- SoundCloud (eingebetteter Player)
- Spotify (embedded player)
- Stripe
- swisstopo maps (geo.admin.ch)
- TikTok (embedded videos)
- TikTok Pixel
- Trustpilot TrustBox
- Typeform
- Umami (self-hosted)
- Umami Cloud
- Vercel Web Analytics
- Vimeo
- Worldline Saferpay
- X (embedded posts)
- X Pixel (Conversion-Tracking)
- YouTube
- Zendesk Web Widget (Messaging)
From entry to config
The catalog contains facts with a source, not a legal assessment. The category is set by you, the operator, when you turn an entry into a service.
toConsentService takes over name, provider, purpose, cookies and privacy policy link. You add the category. The catalog cannot set it for you, and entries may not contain one.
import { catalog, toConsentService } from "@weber-development/permito-catalog"
const entry = catalog.find((e) => e.id === "google-analytics-4")
if (!entry) throw new Error("Entry not found")
// The category is your decision. The catalog never sets it.
const service = toConsentService(entry, { category: "statistics" })Scanner
ScannerA recorded run.
The scanner loads a page in headless Chromium without clicking anything and compares what it sees with your consent config. It reports and changes nothing.
This is a recorded run against a demo page, not a live check. The config for the run lists one service, Google Analytics 4.
Scanned page: http://127.0.0.1:4317/
- Not in your config
- 3
- Active before consent
- 4
- Matched, for information
- 0
Not in your config
3A cookie, storage key or third-party host that no configured service accounts for. Where the catalog knows a match, it suggests an entry. Whether it belongs in your config, and in which category, is your decision.
connect.facebook.nethostCatalog suggestions: Facebook (social plugins, embedded posts) (
facebook-embed), Meta Pixel (meta-pixel)fonts.googleapis.comhostCatalog suggestions: Google Fonts (
google-fonts)www.facebook.comhostCatalog suggestions: Meta Pixel (
meta-pixel)
Active before consent
4The entry belongs to a configured service that needs a decision, and it was present before any consent existed. This is an observation, not an assessment. A possible cause is a script that is not gated or a tag manager that loads it regardless.
_ga_DEMO123456cookieService:
google-analytics-4, Category:statistics_gacookieService:
google-analytics-4, Category:statisticsregion1.google-analytics.comhostService:
google-analytics-4, Category:statisticswww.googletagmanager.comhostService:
google-analytics-4, Category:statistics
Run it yourself
npx permito scan https://client.example --config consent.config.tsExit code
This run: 1
0No findings.1At least one finding, not in your config or active before consent.2Error during the run, for example an unreachable page or a missing Chromium.
A clean run is a snapshot, not proof. The scanner does not click, scroll or log in, so it misses what loads only after an interaction.
GTM check
GTM container checkBefore the container goes live.
permito gtm-check reads a container export from Google Tag Manager and matches each tag to a catalog service. It uses Google's tag types, the hosts in Custom HTML and community templates. It reads the file only and makes no network request.
Built from a demo container, not a client's.
The export and the config were made for this page.
The container export
example.ch, GTM-ABC1234, version 42. Tags as listed in the export file.
| Tag | Type | Trigger | Consent check |
|---|---|---|---|
| GA4 - Config | gaawc | Consent Initialization - All Pages | notSet |
| GA4 - purchase | gaawe | Event - purchase | notSet |
| Ads - Purchase conversion | awct | Event - purchase | notSet |
| Conversion Linker | gclidw | All Pages | notSet |
| HTML - Meta Pixel | html | All Pages | notSet |
| HTML - Hotjar | html | All Pages | needed |
| HTML - Chat widget | html | All Pages | notSet |
| Pinterest Tag | cvt_98765432_21 | All Pages | notSet |
| Pixel - Meta noscript fallback (old) | img | All Pages | notSet |
| Cookie banner (Foo) | cvt_98765432_33 | Consent Initialization - All Pages | notSet |
The table scrolls sideways inside its frame.
Service not in your config
2The tag belongs to a catalog service that your Permito config does not list. Add the service or remove the tag.
HTML - Meta Pixel
htmlService:
meta-pixel, via host connect.facebook.net, www.facebook.comadd the service to your Permito config (catalog: meta-pixel), or remove the tag.
Pixel - Meta noscript fallback (old)
imgpaused, not countedService:
meta-pixel, via host www.facebook.comadd the service to your Permito config (catalog: meta-pixel), or remove the tag.
Fires without an additional consent check
1The service is in the config, but the tag has no consent check of its own (consentSettings not set). Set one, or gate the tag with a Permito consent trigger.
Pinterest Tag
cvt_98765432_21Service:
pinterest-tag, Category:marketing, via template "Pinterest Tag"this tag fires without an additional consent check. Set a consent check on the tag or gate it by a Permito consent trigger.
Tag not assigned to a catalog service
2No catalog service matches. Check what the tag loads, then add a custom service to the config or confirm it needs none.
HTML - Chat widget
htmlHosts:
widget.chatbubble.exampleno catalog service matches this tag. Check what it loads, then add a custom service to your Permito config or confirm the tag needs none.
Cookie banner (Foo)
cvt_98765432_33no catalog service matches this tag. Check what it loads, then add a custom service to your Permito config or confirm the tag needs none.
Notice: Google tag with built-in consent check
4Google documents a built-in consent check for these tag types. They are listed for information and do not count toward the exit code.
GA4 - Config
gaawcService:
google-analytics-4, Category:statistics, via tag type "gaawc"make sure consent mode is wired to your Permito consent state; an additional consent check on the tag is optional.
GA4 - purchase
gaaweService:
google-analytics-4, Category:statistics, via tag type "gaawe"make sure consent mode is wired to your Permito consent state; an additional consent check on the tag is optional.
Ads - Purchase conversion
awctService:
google-ads-conversion, Category:marketing, via tag type "awct"make sure consent mode is wired to your Permito consent state; an additional consent check on the tag is optional.
Conversion Linker
gclidwService:
google-ads-conversion, Category:marketing, via tag type "gclidw"make sure consent mode is wired to your Permito consent state; an additional consent check on the tag is optional.
No finding
1HTML - Hotjar
htmlService:
hotjar, Category:statistics, via host static.hotjar.comno action.
Run it yourself
npx permito gtm-check export.json --config consent.config.tsExit code
This run: 1
0No finding that counts.1At least one tag is not in the config, has no consent check or cannot be assigned. Fits a CI step.
The result is an observation about the export file. Whether a service needs consent is your decision, set in the category and requiresConsent of your config.
Monitoring
Monitoring many client sitesOne run, one issue per site.
permito scan --sites checks every client site listed in a sites file in one run and writes a report per site. Findings the client has decided to keep go into accepted, per site.
This is a recorded run against two local test sites, not a live check. Bakery Muster and Shop Beispiel are demo sites made for this page, not client sites.
Run it yourself
npx permito scan --sites permito.sites.json --report-dir reportspermito.sites.json
{
"sites": [
{
"name": "Bakery Muster",
"url": "http://127.0.0.1:4318/",
"config": "./clean.config.mjs"
},
{
"name": "Shop Beispiel",
"url": "http://127.0.0.1:4317/",
"config": "./consent.config.mjs",
"accepted": [
{
"type": "host",
"name": "fonts.googleapis.com",
"note": "Fonts are loaded on purpose; the client decided."
}
]
}
]
}Summary of the run
| Site | Status | Not in config | Before consent | Accepted |
|---|---|---|---|---|
| Bakery Muster | Clean | 0 | 0 | 0 |
| Shop Beispiel | Findings | 2 | 4 | 1 |
The table scrolls sideways inside its frame.
Report for Shop Beispiel
The Markdown file the run writes for this site. The accepted entry is listed apart from the findings.
Shop Beispiel
- Site: http://127.0.0.1:4317/
- Scanned: 2026-10-05T09:32:58.008Z
- Status: findings
Not in the consent config (2)
connect.facebook.net(host) (catalog knows: facebook-embed, meta-pixel)www.facebook.com(host) (catalog knows: meta-pixel)
To do: add the service to the config, mark it as accepted in the sites file, or ignore the host.
Active before consent was given (4)
_ga_DEMO123456(cookie, first-party) -> google-analytics-4 [statistics]_ga(cookie, first-party) -> google-analytics-4 [statistics]region1.google-analytics.com(host) -> google-analytics-4 [statistics]www.googletagmanager.com(host) -> google-analytics-4 [statistics]
To do: check that the script is gated by ConsentScript / data-consent markup and that no tag manager loads it regardless of consent.
Accepted (1)
fonts.googleapis.com(host) (catalog knows: google-fonts) Note: Fonts are loaded on purpose; the client decided.
Observations from an automated scan, not a legal assessment.
GitHub Action template
The scanner package ships a workflow template. It runs weekly and opens one issue per client site. It comments only when something new appears and closes the issue once the site is clean again.
- Weekly, Mondays at 05:00 UTC, or started by hand.
- One issue per site, in the repository you put the workflow in.
- A comment only for new differences, not for ones already reported.
- Runs on GitHub's runners in your agency's organisation. There is no hosted dashboard and nothing is sent to Seya.
A clean run is a snapshot of the pages the scanner loads, not proof.
name: Permito monitor
on:
schedule:
- cron: "0 5 * * 1" # Mondays, 05:00 UTC
workflow_dispatch:
permissions:
contents: read
issues: write
# ...install packages and Chromium, then:
- name: Scan all sites
run: |
set +e
npx permito scan --sites permito.sites.json --report-dir permito-reports
code=$?
if [ "$code" -gt 1 ]; then exit "$code"; fi
- name: Open, update or close issues
run: node node_modules/@weber-development/permito-scanner/templates/permito-monitor.mjs permito-reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Excerpt. The full template is in the scanner package.
Catalog changes
Catalog changes per projectOnly the services you use.
After you update the catalog package, permito-catalog changes lists what changed for the services in your own config, for example cookie durations, third countries or the legal entity. Every release also ships these changes as a changes.json, so they can be reviewed in the version pull request.
Example output from a simulated catalog update.
The changes.json behind it was produced by the real script from a simulated update. It does not describe a real change in the catalog.
Output
Catalog changes since 0.2.0:
google-analytics-4
0.3.0 (2026-11-02): changed
cookies[_ga].duration.de: "2 Jahre" -> "13 Monate"
cookies[_ga].duration.en: "2 years" -> "13 months"
cookies[_ga].duration.fr: "2 ans" -> "13 mois"
cookies[_ga].duration.it: "2 anni" -> "13 mesi"
hotjar
0.3.0 (2026-11-02): changed
thirdCountryTransfer.countries: [] -> [US]
These changes affect the cookie table. Run permito-cookie-table again and publish the result.Run it yourself
npx permito-catalog changes --since 0.2.0 --config consent.config.tsExit code
This run: 1, because a change touches the cookie table.
A change that affects the cookie table ends the run with exit code 1 and the note to generate the table again. This fits Renovate or Dependabot pull requests, where the check fails until the table is regenerated.
Consent log
Consent logStored on your server.
The log package is not part of this demo, so nothing is recorded here. This is what it stores per change of consent, and the route handler that receives it.
One record
{
"id": "6f1c0b0e-4a52-4d0e-9b57-0e2a3f6c8d11",
"visitorHash": "9b1d5c3a7e0f42a8c6d4b2e19f08a7d3c5e6b4a1f2d0c9e8b7a6f5d4c3b2a190",
"timestamp": "2026-10-05T09:41:12.000Z",
"consentVersion": "2026-10",
"categories": { "necessary": true, "statistics": true, "marketing": false },
"services": {},
"source": "banner",
"region": "CH",
"language": "de-CH"
}Example record with made-up values.
- Stored
- The record is kept in a store you choose, on your infrastructure. The visitor ID is hashed with a secret salt and the ID itself is not stored.
- Not stored
- No IP address and no user agent. Fields the client adds are discarded.
Once the log runs, you process personal data. The retention period is required and has no default. Whether and how you use it is your decision.
Next.js route handler
// lib/consent-log.ts
import { createConsentLog } from "@weber-development/permito-log"
import { fileStore } from "@weber-development/permito-log/file"
export const log = createConsentLog({
store: fileStore(process.env.CONSENT_LOG_FILE ?? "./data/consent-log.jsonl"),
salt: process.env.CONSENT_LOG_SALT!, // at least 32 characters
retentionDays: 90, // your decision, there is no default
})
// app/api/consent-log/route.ts
import { createConsentLogRoute } from "@weber-development/permito-log/next"
import { log } from "@/lib/consent-log"
export const runtime = "nodejs"
export const { POST } = createConsentLogRoute(log, {
allowedOrigins: ["https://www.example.ch"],
})Two files: the log, and the route that receives the browser's POST.
Free 2.0
Purposes, a consent webhook and a safe upgradePermito, free.
Permito 2.0 adds purposes as a first-class idea next to categories, plus a webhook that tells your own backend when someone changes or withdraws consent. Visitors who consented under 1.x are not asked again.
Purposes next to categories
Split a category into purposes with stable IDs, then check or decline a single purpose without touching the rest of its category.
Node script
import { createConsentManager, createMemoryStorage } from "@permitojs/core";
const manager = createConsentManager({
consentVersion: "2026-10",
storage: createMemoryStorage(),
categories: [{ id: "necessary", required: true }, { id: "marketing" }],
purposes: [
{ id: "newsletter", category: "marketing" },
{ id: "retargeting", category: "marketing" },
],
});
await manager.ready;
await manager.update({ marketing: true });
console.log("newsletter:", manager.hasPurposeConsent("newsletter"));
console.log("retargeting:", manager.hasPurposeConsent("retargeting"));
await manager.setPurposeConsent("retargeting", false);
console.log("after decline -> retargeting:", manager.hasPurposeConsent("retargeting"));
console.log("purposes:", JSON.stringify(manager.getSnapshot().purposes));Output
newsletter: true
retargeting: true
after decline -> retargeting: false
purposes: {"newsletter":true,"retargeting":false,"necessary":true}Consent webhook
connectConsentWebhook posts every change to your own URL, including which purposes were withdrawn. parseConsentWebhookPayload validates it on the server.
Node script
import { createConsentManager, createMemoryStorage, connectConsentWebhook, parseConsentWebhookPayload } from "@permitojs/core";
const manager = createConsentManager({
consentVersion: "2026-10",
storage: createMemoryStorage(),
categories: [{ id: "necessary", required: true }, { id: "marketing" }],
purposes: [{ id: "newsletter", category: "marketing" }],
});
await manager.ready;
const received = [];
connectConsentWebhook(manager, {
url: "https://example.com/consent-hook",
subject: "customer-4711",
fetch: async (url, init) => { received.push(init.body); return new Response(null, { status: 204 }); },
});
await manager.update({ marketing: true });
await manager.update({ marketing: false });
await new Promise((r) => setTimeout(r, 50));
const payload = parseConsentWebhookPayload(received[1]);
console.log(JSON.stringify(payload, null, 2));Payload the receiver gets after a withdrawal (trimmed)
{
"format": "permito.consent/2",
"id": "2026-10:2026-10-13T15:59:29.772Z:consent_updated",
"event": "consent_updated",
...
"revoked": {
"purposes": [
"newsletter"
],
"categories": [
"marketing"
],
"services": []
},
"source": "api",
...
}1.x decisions keep working
A consent stored by Permito 1.x is migrated to the new schema when it loads, so returning visitors are not asked again.
Node script
import { createConsentManager } from "@permitojs/core";
const stored1x = { schema: 1, version: "2026-10", timestamp: "2026-09-01T10:00:00.000Z",
categories: { necessary: true, statistics: true, marketing: false }, services: {}, source: "banner" };
const manager = createConsentManager({
consentVersion: "2026-10",
categories: [{ id: "necessary", required: true }, { id: "statistics" }, { id: "marketing" }],
initialState: stored1x,
});
await manager.ready;
const s = manager.getSnapshot();
console.log("needsConsent:", s.needsConsent);
console.log("decision.schema:", s.decision.schema);
console.log("purposes:", JSON.stringify(s.purposes));Output
needsConsent: false
decision.schema: 2
purposes: {"necessary":true,"statistics":true,"marketing":false}Purposes in React
@permitojs/react exports useHasPurposeConsent to gate UI by purpose.
React
import { useHasPurposeConsent } from "@permitojs/react";
const allowed = useHasPurposeConsent("newsletter");Outputs were produced by running these scripts against @permitojs/core 2.0.0 from npm. Node 22 or newer is required.
Read the docsPro 2.1.0
Know what changed, where your team readsPermito Pro.
Pro 2.1.0 adds a Consent Mode check to the scanner, a Tag Manager container for the default consent state, and team alerts that name the new findings from your weekly monitor run.
Alerts in Slack or Teams
The weekly monitor posts one message per run that names the new findings per site, with those active before consent first. It runs in your own GitHub account and sends only site names and finding names to the webhook you set.
Repository secret
PERMITO_ALERT_WEBHOOK = <incoming webhook URL of Slack or Teams>
# any URL that accepts a POST with {"text": "..."} worksConsent Mode checkBeta
The scanner reads the consent state (gcs, gcd) that Google tags send before any interaction. Tags that run granted or without a consent state show up as findings of the type consentMode.
Scan a page
npx permito scan https://example.ch --config ./consent.config.tsTag Manager containerBeta
One command writes an importable Tag Manager container that sets the default consent state on Consent Initialization, before every other tag.
Export the container
npx permito gtm-template --out permito-consent-mode.json
# optional: --wait-for-update <ms> (default 500)Finding keys in the report
summary.json lists findingKeys per site, and the monitor stores them in each issue. That is how it can tell you what is new, not just that something changed.
Monitor run
npx permito scan --sites permito.sites.json --report-dir permito-reportsThe demo cannot show the alerts or the monitor: they run in your own GitHub account with your webhook. The Consent Mode check and the Tag Manager container are beta; the container has not yet been imported into a real Tag Manager account.
Read the docsNext step
Use it in your own projectPricing is per person.
After checkout, Polar gives your GitHub account access. The Pro packages then install from GitHub Packages with a read-only token.
Permito is technical consent infrastructure, not legal advice.