Skip to content

Restore PostHog session recording - #914

Merged
zahlekhan merged 1 commit into
thesysdev:mainfrom
zahlekhan:agent/restore-posthog-session-recording
Jul 31, 2026
Merged

Restore PostHog session recording#914
zahlekhan merged 1 commit into
thesysdev:mainfrom
zahlekhan:agent/restore-posthog-session-recording

Conversation

@zahlekhan

Copy link
Copy Markdown
Contributor

Summary

  • load the full posthog-js browser package instead of the slim module
  • re-enable PostHog session recording with a 10% sample rate
  • allow the recorder extension to load by removing disable_external_dependency_loading

Root cause

The deferred analytics refactor switched the site to posthog-js/dist/module.slim and explicitly disabled both external dependency loading and session recording. That configuration continued to capture pageviews but prevented the session recorder from loading.

Impact

OpenUI site sessions can be recorded again at the previous 10% sampling rate while retaining deferred PostHog initialization.

Validation

  • pnpm install --frozen-lockfile
  • pnpm --filter @openuidev/docs exec prettier --check lib/analytics.ts
  • pnpm --filter @openuidev/docs exec eslint lib/analytics.ts
  • pnpm --filter @openuidev/docs types:check
  • git diff --check

The production docs build was also attempted, but Next.js/Turbopack remained at Creating an optimized production build ... without further output for several minutes, so it was stopped and is reported as inconclusive rather than passing.

@zahlekhan
zahlekhan marked this pull request as ready for review July 31, 2026 11:21
@zahlekhan
zahlekhan enabled auto-merge (squash) July 31, 2026 11:21
@zahlekhan
zahlekhan merged commit f624d92 into thesysdev:main Jul 31, 2026
2 checks passed
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.

2 participants