Consent compliance: docs, agent guide, skills, changelog, shared behaviour spec, browser check, reference e2e
- docs/consent.md: compliance defaults, Global Privacy Control, withdrawal, consent log on by default and the SQL migration; no more "UODO requirement" or "GPC not needed". docs/analytics.md: what Consent Mode advanced sends. - docs/consent-behaviour-spec.md: the behaviour IAPL and IAWL share, with the 13-item test list. - CHANGELOG 1.17.0: the SQL migration first, a before → after table for an existing site. - AGENT.md, iapl-setup / iapl-upgrade / iapl-reference / iapl-consent-check, PROGRAMISTA item 78; reference skills copy. - iapl-consent-check: Global Privacy Control, equal prominence and withdrawal runs; Google asset warnings. - Reference site uses the new defaults; e2e for GPC, a stale grant, equal prominence, withdrawal; e2e:built runs every consent test in both bundlers. YouTubeEmbed warns in development without a poster. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
99036eb70c
commit
f5c53e4523
+23
-8
@@ -8,12 +8,15 @@ according to the consent from the consent module:
|
||||
everything `denied`). Then it depends on `consentMode`:
|
||||
- `'advanced'` (default): the `googletagmanager.com` script loads **right away,
|
||||
also before consent**. With `denied`, Google stores no cookies (`_ga`), but it
|
||||
can send cookieless pings — this is **not** "zero requests before consent".
|
||||
sends cookieless pings — this is **not** "zero requests before consent" (what they carry: below).
|
||||
Exception since 1.17.0: a visitor whose browser sends **Global Privacy Control** gets no Google request until
|
||||
they grant analytics or marketing ([consent.md](./consent.md#global-privacy-control-1170)).
|
||||
- `'basic'`: **zero requests to Google before consent** — the script waits until
|
||||
the visitor grants analytics or marketing (see "How Consent Mode works" below).
|
||||
- **Others (Meta Pixel, Microsoft Clarity, LinkedIn Insight, TikTok Pixel)** —
|
||||
they have no Consent Mode, so they load **only after consent** for their
|
||||
category. They react live: click "Accept" → the tag starts without a reload.
|
||||
category. They react live: click "Accept" → the tag starts without a reload; withdraw → Meta, TikTok and Clarity
|
||||
are told at once (1.17.0). Clarity also gets its own consent signal (`consentv2`) when it loads.
|
||||
|
||||
## Config
|
||||
|
||||
@@ -136,7 +139,19 @@ no conversion modelling for visitors without consent. The default `advanced` loa
|
||||
with `denied` signals. In both modes the Consent Mode default is set first. The mode is the client's
|
||||
decision — record it in `AGENTS.md` → "Project decisions".
|
||||
|
||||
The rule itself is `shouldLoadGoogle({ consentMode, ready, state })` — a pure function (no React, no DOM)
|
||||
**What `advanced` sends before consent** (Google's documentation): the Google tag script is downloaded from
|
||||
`googletagmanager.com`, and while the signals are `denied` it sends cookieless pings to Google — the timestamp,
|
||||
user agent and referrer the browser adds to any request, whether the page or a previous one carried an ad-click id,
|
||||
the consent state, and a random number per page load. Every request carries the visitor's IP address (Google says
|
||||
Ads truncates it while `ad_storage` is denied and Analytics does not log it). No cookie is read or written. Google
|
||||
uses the pings for conversion and behaviour modelling — which needs volume: GA4 about 1,000 events a day with
|
||||
analytics denied for 7 days, Google Ads 700 ad clicks in 7 days per country — so on a small site the pings often buy
|
||||
nothing. Under the EDPB's guidelines on the technical scope of ePrivacy art. 5(3) (2/2023) a script that makes the
|
||||
browser send information is in scope whether or not a cookie is involved; no authority has ruled on Consent Mode by
|
||||
name. `'basic'` sends nothing before consent. `ads_data_redaction` is set with the default (since 1.17.0).
|
||||
|
||||
The rule itself is `shouldLoadGoogle({ consentMode, ready, state, gpc? })` — a pure function (no React, no DOM;
|
||||
`gpc`: Global Privacy Control applies, then `advanced` waits like `basic`)
|
||||
exported from `@intecion/ipal-kit/client` and `@intecion/ipal-kit`. Use it for your own Google-dependent
|
||||
code (a Maps embed, a YouTube player with Google Ads), so it follows the same consent rule as `<Analytics>`:
|
||||
|
||||
@@ -154,11 +169,11 @@ const allowed = shouldLoadGoogle({ consentMode: 'basic', ready: true, state: con
|
||||
3. Click in the banner → `gtag('consent', 'update', …)` → tags react immediately.
|
||||
|
||||
Withdrawing consent (true → false) deletes the category's cookies (`_ga*`, `_fbp`,
|
||||
`_clck`, `_ttp`, … — see [consent.md](./consent.md)) and sends an `update` to
|
||||
Google, but **non-Google scripts that are already loaded (Meta, Clarity,
|
||||
LinkedIn, TikTok) stay on the page until reload** — the plugin does not unload
|
||||
them. The same goes for a Google tag already loaded in `basic` mode — from then
|
||||
on it is governed by the Consent Mode `update`.
|
||||
`_clck`, `_ttp`, … — see [consent.md](./consent.md)) and its listed storage keys, sends an `update` to
|
||||
Google, and tells the non-Google tags already on the page (1.17.0): Meta `fbq('consent', 'revoke')`, TikTok
|
||||
`ttq.revokeConsent()`, Clarity `clarity('consent', false)`. A script cannot be unloaded; LinkedIn Insight has no
|
||||
consent call and stops with the next page load. A Google tag already loaded in `basic` mode is governed by the
|
||||
Consent Mode `update` from then on.
|
||||
|
||||
Mapping of categories to Google signals:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user