Files
ipal-kit/docs/agent/skills/ipal-consent-check/SKILL.md
T
Radosław SmolińskiandClaude Opus 5.5 b61b753ec2 Merge main (security-perf + SEO) into docs; finish English docs and agent guide
- Resolve conflicts in analytics, consent, content, i18n, mcp and stats,
  keeping the docs fixes and the new code behaviour, verified against src
- Translate the remaining 14 module pages, ipal-seo-check skill and script
- Integrate the security-perf and SEO agent-guide text: getRobots,
  isPathVisible, Search & AI (DNS verification first, meta fields optional),
  sitemap index/cache/503, consentMode basic/advanced, policyVersion,
  globalOverrides, revalidatePath / buildGlobalRevalidateHook, authAccess,
  firstUserAdmin, allowCollectionMismatch, unknown-IP rate limit; stale
  claims fixed across AGENT.md, skills, frontend, developer guide, vibe
- docsConsistency: pending list removed (all docs English); relative links
  now also check #anchors

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 17:59:52 +02:00

5.4 KiB

name, description
name description
ipal-consent-check Proves in a real browser (Playwright) that an ipal-kit site respects cookie consent — no Meta/Clarity/LinkedIn/TikTok/Ads requests and no tracking cookies before a decision or after "reject", Google only with Consent Mode "denied" signals, tags starting after "accept". Use after adding analytics, pixels, embeds (YouTube, maps, chat) or third-party scripts, before handing a site over, and whenever GDPR/RODO or cookie banner behaviour is in question.

ipal-consent-check

GDPR: non-Google tags load only after consent; Google (GA4/GTM) may load earlier only with the Consent Mode "denied" signal and without cookies. That early load happens only in Consent Mode advanced (the default); with <SiteProviders analytics={{ consentMode: 'basic' }}> no request goes to googletagmanager.com before analytics or marketing consent — check the project's choice in "Project decisions".

Steps

  1. Once per project:
    pnpm add -D playwright && pnpm exec playwright install chromium
    
  2. Start the app (pnpm build && pnpm start) and check a page with tags (ideally the homepage and a page with a form/video):
    node .agents/skills/ipal-consent-check/scripts/consent-check.mjs http://localhost:3000/pl
    
    --wait 6000 when tags start slowly (defer mode in Analytics).
  3. Output: three runs in clean profiles — no decision, "Accept", "Reject" + reload. Every [ERROR] is a violation — fix it:
Violation Cause → fix
pixel loaded without consent script wired by hand / copied Analytics → ID in Site Integrations, <Analytics> from the plugin (analytics.md)
tracking cookie set without consent same; or GTM fires a tag without an ad_storage condition (analytics.md → GTM)
GA hit with consent GRANTED setDefaultConsent not before the tag — <Analytics> must be inside <ConsentProvider> (SiteProviders does this itself)
YouTube / Maps before consent (warning) ConsentScript (consent.md), youtube-nocookie.com or "click to load"
  1. The "after accept" section shows what starts after consent — compare it with the IDs in Site Integrations (e.g. is Meta Pixel there, if the client has one). Nothing starts but IDs are filled in → report it as a problem to diagnose (ipal-debug).
  2. Banner not found (data-ipal="banner") → <CookieBanner/> is not rendered, or an older ipal-kit version without data-ipal attributes on the buttons → ipal-upgrade.

The script needs buttons with data-ipal="accept" / "reject" — the plugin's CookieBanner has them in every settings mode (inline, modal, detailed). A custom banner in the project violates AGENT.md §7.

After every change of tools (new pixel, chat, map, video) and before handing the site over:

  1. Scan the running site (without consent and after "Accept all", homepage + up to 10 pages from the sitemap):
    node .agents/skills/ipal-consent-check/scripts/cookie-scan.mjs http://localhost:3000 --lang pl
    
    Output: cookie-scan/cookies.json and cookie-scan/cookies.md (table). [ERROR] = a non-necessary cookie set before consent — fix it as in the table above. [WARNING] unknown — find the provider and purpose, set category (necessary|functional|analytics|marketing) and purpose in cookies.json. Do not guess — ask if you do not know.
  2. Import into the panel (Cookie Settings → Cookies), each language separately (scan with --lang en for English):
    LOCALE=pl pnpm payload run .agents/skills/ipal-consent-check/scripts/import-cookies.ts cookie-scan/cookies.json
    
    It merges by name and does not overwrite editor changes (OVERWRITE=1 forces it). It does not delete cookies the scan did not see — the editor does that in the panel. The same list feeds the <CookieBanner settings="detailed"> window (an expandable list under each category) — after the import open "Settings" in the banner and check that every category shows its cookies and that the labels (Cookie Settings → Detail labels) are in that language.
  3. The cookie policy page shows the table from the panel — do not paste the list into the policy text:
    import { getCookieTable } from '@intecion/ipal-kit'
    import { CookieTable } from '@intecion/ipal-kit/rsc'
    import { getCachedPayload, getSiteShell } from '@/lib/content'
    const rows = await getCookieTable({ payload: await getCachedPayload(), locale })
    const { consent } = await getSiteShell(locale)   // category names from Cookie Settings
    <CookieTable rows={rows} categories={consent.categories} labels={labels} />
    
    labels = { name, category, provider, purpose, duration } (all required). The plugin panel has only provider / purpose / duration (Cookie Settings → Detail labels = consent.details); take the name and category headers from (localized) fields of the project block. The table is unstyled (classNames: table, caption, tr, th, td; optional caption). A project "Cookie table" block on the policy page is a good place — then the editor decides where it appears.

Lifetime: Chrome caps every cookie at max. 400 days (13 months) — the scan shows what really stays in the browser. localStorage keys (e.g. ipal-theme — the chosen theme) are listed separately.