Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Posthog #960

Merged
merged 31 commits into from
Mar 21, 2025
Merged

Introduce Posthog #960

merged 31 commits into from
Mar 21, 2025

Conversation

svemat01
Copy link
Member

No description provided.

Copy link

cloudflare-workers-and-pages bot commented Feb 19, 2025

Deploying ens-app-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 27b7ad6
Status: ✅  Deploy successful!
Preview URL: https://7837b541.ens-app-v3.pages.dev
Branch Preview URL: https://introduce-posthog.ens-app-v3.pages.dev

View logs

@svemat01 svemat01 force-pushed the introduce-posthog branch 2 times, most recently from b9556cf to 674d307 Compare February 24, 2025 08:46
@svemat01 svemat01 marked this pull request as ready for review March 11, 2025 12:58
@svemat01 svemat01 requested a review from sugh01 as a code owner March 11, 2025 12:58
svemat01 added 16 commits March 11, 2025 14:02
Introduces comprehensive analytics tracking using PostHog across the application:
- Added PostHog configuration and provider
- Created type-safe event tracking utility
- Implemented analytics events for key user interactions in registration, import, search, and wallet flows
- Added environment variables for PostHog configuration
- Removed legacy event tracking hooks
- Add chain ID registration to PostHog tracking
- Enhance user identification with initial address property
- Modify event name for DotBox registration tracking
- Add duration type to registration event tracking
- Modify console listener regex to match PostHog event tracking
- Update event name assertion from 'search_selected_eth' to 'search:select'
- Import EventDefs from analytics events utility
- Standardize event tracking names across import, registration, and box registration specs
- Update console listener regex to match PostHog event tracking
- Simplify and normalize event names (e.g., 'search:select', 'register:pricing', 'wallet:open')
- Add production detection function to conditionally log metrics events
- Update PostHog provider and event tracking to use production detection
- Modify console logging to use consistent '[Metrics]' prefix
- Simplify event logging across different components
Update CSP to allow scripts from PostHog analytics domain, complementing recent analytics integration
Update registration test to allow for gas percentage fluctuations by using a more flexible regex match
- Change PostHog host to custom domain
- Update Content Security Policy to allow scripts from new PostHog host
- Modify default PostHog API host to EU endpoint
- Implement cookie consent system with localStorage persistence
- Create CookieConsentBanner component for user consent
- Add cookie consent settings to Privacy section
- Configure PostHog persistence based on user consent
Optimize pattern matching in PrivacySection to use `.otherwise()` for handling undecided cookie consent state
Remove unnecessary default export from CookieConsentBanner component to maintain consistency with existing import patterns
@svemat01 svemat01 force-pushed the introduce-posthog branch from f83f775 to 9c54e15 Compare March 11, 2025 17:23
Add state tracking for banner visibility to ensure consistent display of cookie consent banner when consent is undecided
Introduce useSetupIntercom hook to centralize Intercom initialization and tracking, removing direct Intercom configuration from Basic layout and improving separation of concerns
sugh01 and others added 3 commits March 13, 2025 11:13
Refactor event names in the registration flow to follow a consistent naming convention. Introduce new tracking events for transaction states, including sending, failure, and completion. Remove deprecated event names to streamline analytics integration.
Move the tracking event test for 'transaction:register:send' to a new position within the registration steps to improve clarity and maintainability of the test suite.
svemat01 and others added 9 commits March 17, 2025 16:24
Eliminate the unnecessary call to clear console messages in the tracking event test for 'wallet:open' to streamline the test execution and improve clarity.
Move the tracking event test for 'transaction:register:send' back into the registration flow to enhance clarity and ensure proper event tracking during the registration process.
Introduce new tracking events for import transaction states (send, complete, fail) and refactor existing tests to ensure accurate event firing during the import process. Remove deprecated event names to streamline analytics integration.
Refactor the test for DNS import tracking to use the updated event name 'transaction:import:send' instead of 'import:transaction_start' to ensure consistency with the latest event naming conventions.
Change the event name in the registration test from 'register:transaction_override' to 'transaction:register:override' to align with the updated naming conventions and ensure accurate event tracking.
Reintroduce the gas cost check in the disabled condition of the import next button to prevent user interaction when gas cost is zero, ensuring proper flow control during the import process.
@sugh01 sugh01 merged commit 9f1e06f into main Mar 21, 2025
40 checks passed
@sugh01 sugh01 deleted the introduce-posthog branch March 21, 2025 14:22
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.

3 participants