Gap fixes: top-level searchSettings, public shouldLoadGoogle, consent/stats collection overrides
- ipalKit({ searchSettings }): switches off / reshapes Site Settings → Search & AI
without `seo`; read as options.searchSettings ?? options.seo?.searchSettings.
- shouldLoadGoogle moved to a pure module (analytics/shouldLoadGoogle.ts) and
exported from @intecion/ipal-kit and /client.
- consentLog.collectionOverrides and stats.collectionOverrides (object merges
access/admin/hooks key by key, function takes over), via the new exported
applyCollectionOverride / CollectionOverride. The stats view and dashboard
chart now follow the stats-visits read access, so overrides narrow them too.
All additive; defaults unchanged. Docs: AGENT.md, ipal-reference, consent,
stats, seo, analytics, ipal-setup.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4911da7112
commit
5a07c42f76
@@ -136,6 +136,16 @@ 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)
|
||||
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>`:
|
||||
|
||||
```ts
|
||||
import { shouldLoadGoogle } from '@intecion/ipal-kit/client'
|
||||
|
||||
const allowed = shouldLoadGoogle({ consentMode: 'basic', ready: true, state: consent })
|
||||
```
|
||||
|
||||
1. Before the tag loads: `gtag('consent', 'default', { …, wait_for_update: 500 })`
|
||||
with the visitor's stored decision (or everything `denied` when they have not
|
||||
decided yet or the consent is from another policy version — `texts.version`).
|
||||
|
||||
Reference in New Issue
Block a user