Skip to content

fix(website): correct 1DS consent and move cookie banner to top - #1514

Merged
Wassim Chegham (manekinekko) merged 1 commit into
mainfrom
manekinekko-website-1ds-analytics
Oct 16, 2026
Merged

Wassim Chegham (manekinekko) merged 1 commit into
mainfrom
manekinekko-website-1ds-analytics

Conversation

@manekinekko

Copy link
Copy Markdown
Member

Summary

  • Pass the current, explicit WCP Analytics consent into propertyConfiguration.userConsented before initializing each 1DS instance. Delaying SDK initialization alone left opted-in page views carrying ext.web.userConsent: false.
  • Preserve the registered scope App ID, existing ingestion identifier, PROD environment, disabled analytics cookies, URL query/fragment exclusions, and opt-in/withdrawal/GPC/DNT protections.
  • Move the Microsoft consent banner above the fixed site header while keeping the skip link first. Keep header, mobile menu, sidebar, table-of-contents, and content offsets aligned when the banner wraps or disappears.
  • Add consent/navigation/loading-race regressions and responsive banner coverage across landing, documentation, community, and generated API pages. Update the website README and public privacy notice.

CJA dashboard visibility has not been verified; the fix still needs deployment before confirming new events in Web - All - Prod.

Demos

Website-only change; Portal/CLI recordings are N/A. Desktop and mobile screenshots were inspected locally using the real WCP banner.

Before

N/A — no Portal/CLI changes. On the website, the banner rendered below the footer, and accepted visits still emitted userConsent: false.

After

N/A — no Portal/CLI changes. The website banner sits above the header at desktop/mobile widths, and opted-in initial/subsequent page views emit userConsent: true.

Testing

  • cd website && SITE=https://microsoft.github.io BASE_PATH=/scope npx --yes pnpm@10.29.1 run build — passed, 225 HTML pages built.
  • cd website && npx --yes pnpm@10.29.1 test — passed, 7 plugin tests.
  • cd website && npx --yes pnpm@10.29.1 exec playwright test --reporter=dot — passed, all 84 accessibility/privacy/analytics cases across light/dark themes and 1280px/320px widths.
  • npx --yes --package=typescript@5.9.3 tsc --noEmit --project website/tsconfig.json — failed with 10 pre-existing diagnostics in the Astro configuration, starlight-openapi, and missing root Vitest types. An in-memory compiler comparison against HEAD confirmed identical full-project diagnostics, zero diagnostics in the changed TypeScript files, and no introduced errors.
  • git diff --check — passed.
  • Local browser verification with real WCP and the actual 1DS-Web-JS-3.2.18 SDK — passed at 1280px and 320px: no SDK load before consent; accepted initial and subsequent page views serialize ext.web.userConsent: true, retain iKey: "o:d73f4c6d7bfd4f54ab769e2baaf3156b", and restore the header offset after acceptance. Consent-management dialogs remain usable. Collector requests were intercepted locally; no synthetic telemetry was sent to Microsoft during these checks.
  • Both new root-cause regressions were reproduced against the original build before applying the fix.

Documentation and compatibility

  • Updated website analytics and consent and the public data-collection notice.
  • Breaking changes, API/CLI compatibility impacts, dependency changes, migrations, and upgrade steps: None.
  • Deploy through the existing GitHub Pages workflow, then confirm newly consented events in CJA. A successful collector response alone does not establish CJA data-view visibility.

Checklist

  • If Portal features changed, keep CLI capabilities in sync. — N/A (website-only).
  • If Portal components changed, update their Storybook stories. — N/A (website-only).
  • If database changes require a migration, include up() / down() and keep it CosmosDB-compatible. — N/A (no database changes).
  • If dependencies changed, update the lockfile and regenerate NOTICE / NOTICE-REVIEW.txt with pnpm notice as needed. — N/A (no dependency changes).
  • Video showing the behavior before the suggested change — N/A (no Portal/CLI changes).
  • Video showing the behavior after the suggested change — N/A (no Portal/CLI changes).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e66fbb0c-26e6-4760-b481-e8636fa35dc8
@github-actions github-actions Bot added type: documentation Documentation additions, corrections, and improvements. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. labels Oct 16, 2026
@manekinekko
Wassim Chegham (manekinekko) marked this pull request as ready for review October 16, 2026 20:24
@manekinekko Wassim Chegham (manekinekko) added area: website Scope documentation website (Astro) under website/. type: bug Incorrect behavior or a regression that needs fixing. labels Oct 16, 2026
@manekinekko
Wassim Chegham (manekinekko) merged commit 6a91d78 into main Oct 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: website Scope documentation website (Astro) under website/. language: javascript Work involving JavaScript code, tooling, or dependencies. topic: testing Test coverage, test infrastructure, and validation quality. topic: ui Portal, visual presentation, layout, and interface components. type: bug Incorrect behavior or a regression that needs fixing. type: documentation Documentation additions, corrections, and improvements.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant