Skip to content

feat(scripts): add consent-gated Microsoft Clarity integration - #176

Merged
jamiedavenport merged 1 commit into
mainfrom
clarity-support-plan
Aug 3, 2026
Merged

feat(scripts): add consent-gated Microsoft Clarity integration#176
jamiedavenport merged 1 commit into
mainfrom
clarity-support-plan

Conversation

@jamiedavenport

Copy link
Copy Markdown
Owner

Summary

Adds Microsoft Clarity support: a clarity() factory in @policystack/scripts that gates the clarity.ms tag behind analytics consent, following the same official-snippet-order pattern as the other vendors. Since Clarity enforces consent signals for EEA/UK/CH traffic (Oct 31, 2025), the integration queues a consentv2 call (analytics_Storage: granted, ad_Storage denied by default, overridable) so the vendor drains it on load.

Changes

  • New @policystack/scripts/clarity subpath export with tests, plus wiring (barrel, package exports, vite pack entry, knip)
  • New microsoft-clarity vendor record in the @policystack/vite scanner registry (global clarity, @microsoft/clarity package, clarity.ms/tag script URL), appended after the legacy block to preserve first-match order; registry order test updated
  • Docs: Clarity section in consent/scripts.md (with the EEA consent-signal note) and scanner registry list update
  • Changeset: minor for @policystack/scripts and @policystack/vite

Adds clarity() to @policystack/scripts (queues the consentv2 signal
Clarity requires for EEA/UK/CH traffic before the tag loads) and a
microsoft-clarity vendor record to the @policystack/vite scanner
registry, plus docs and a changeset.
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
op-demo Ready Ready Preview Aug 3, 2026 6:36pm
openpolicy-sh Ready Ready Preview Aug 3, 2026 6:36pm
policystack Ready Ready Preview Aug 3, 2026 6:36pm

Request Review

@jamiedavenport
jamiedavenport merged commit 6958fc7 into main Aug 3, 2026
5 checks passed
@jamiedavenport
jamiedavenport deleted the clarity-support-plan branch August 3, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant