Skip to content

Add funnel telemetry for documentation journeys - #1652

Draft
David Pine (IEvangelist) wants to merge 5 commits into
mainfrom
ievangelist-reopen-funnel-telemetry
Draft

David Pine (IEvangelist) wants to merge 5 commits into
mainfrom
ievangelist-reopen-funnel-telemetry

Conversation

@IEvangelist

Copy link
Copy Markdown
Member

Summary

  • add a versioned, consent-gated funnel event contract for CLI installation, getting started, search, integrations, deployment, troubleshooting, 404 recovery, and existing-app adoption
  • instrument shared components plus relevant English and Japanese guides with bounded stage and dimension metadata
  • correlate short-lived same-origin continuation outcomes
  • prevent raw search queries, query-bearing URLs, raw referrer paths, and arbitrary 404 paths from entering analytics payloads
  • keep the CLI installation funnel limited to reliable browser-side stages through command_copied; server-side request measurement remains deferred until StaticHost has a compatible telemetry exporter

This replaces #1583 because its deleted fork head could not be reopened or retargeted. This branch is hosted directly in microsoft/aspire.dev and is rebased onto the latest main.

Fixes #1582

OneDS auto-capture decisions

  • pageView: false and onLoad: false remain intentional: those events are captured manually after URL sanitization is registered, avoiding duplicate initial events and adding one deduplicated page view per Astro route.
  • jsError: true preserves automatic JavaScript error collection.
  • existing onUnload, click, scroll, and resize collection remains enabled.
  • SPA page views now receive an explicit canonical previous-route referrer; external referrers are reduced to origin only.

Third-party links and affiliations

None.

Validation

  • targeted ESLint for changed analytics scripts and tests
  • pnpm --dir ./src/frontend exec vitest run --config vitest.config.ts tests/unit/analytics-script-contracts.vitest.test.ts tests/unit/custom-components.vitest.test.ts (75 passed)
  • pnpm --dir ./src/frontend exec playwright test tests/e2e/analytics-scripts.spec.ts (60 passed across desktop, tablet, and mobile Chromium)
  • pnpm --dir ./src/frontend run build:skip-search (15,210 pages built; internal links valid)
  • local Chromium hot-path benchmark: unrelated clicks measured 4.13 µs each versus 3.27 µs on main (+0.86 µs); analytics scripts add about 6.2 KB Brotli-compressed combined

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the CLI install funnel limited to reliable client-side signals until the StaticHost exporter uses a supported telemetry destination.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve JavaScript error capture, canonicalize SPA referrers, release route-scoped observers, and reset stale troubleshooting state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@IEvangelist
David Pine (IEvangelist) force-pushed the ievangelist-reopen-funnel-telemetry branch from d325d2b to 6883c4f Compare September 11, 2026 12:49
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1652. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1652 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

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.

Measure documentation and UX funnel drop-off

1 participant