Posthog webview experiments - #2890
Open
mwvolo wants to merge 18 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rollout Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ion events The k12 top-level nav A/B is no longer needed now that streamlined_nav shipped as a CMS flag. Register streamlined_nav as a PostHog super property so any funnel can be sliced by cohort without new events, and capture the 11 conversion events (PDF downloads, donations, forms, search, resource access) via the existing lightweight captureEvent() helper rather than installing the posthog-js SDK, which would have double-initialized PostHog alongside the GTM-loaded instance. Co-Authored-By: Claude <noreply@anthropic.com>
Member
Author
|
@copilot resolve the merge conflicts in this pull request |
…iments # Conflicts: # test/src/contexts/streamlined-nav.test.tsx Co-authored-by: mwvolo <3905516+mwvolo@users.noreply.github.com>
Contributor
Co-authored-by: mwvolo <3905516+mwvolo@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive integration with PostHog analytics throughout the application, enabling detailed event tracking, user identification, and feature flag-driven UI experimentation. The changes include a new helper module for PostHog, event capture on key user actions, user identification management, and feature flag usage for conditional UI rendering, especially in navigation menus.
Analytics Integration and Event Tracking:
posthog.tshelper module with utility functions for capturing events, identifying users, registering properties, and reading feature flags; includes a custom React hook for flag-driven UI updates.captureEventcalls:BookSelector(book_selected) [1] [2] [3] [4]SearchBar(book_search_performed) [1] [2] [3]gated_content_viewed,gated_content_form_submitted) [1] [2] [3]contact_form_submitted) [1] [2] [3]donation_initiated) [1] [2]User Identification and Cohort Tagging:
PostHogUserIdentifiercomponent in the application shell.streamlined_nav) on all subsequent events for funnel analysis, using feature flags from the shared data context. [1] [2]Feature Flag-Driven UI Experiments:
These changes lay the groundwork for robust analytics, experimentation, and user segmentation across the application.