-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(web-analytics): Move revenue tracking to data management #28087
feat(web-analytics): Move revenue tracking to data management #28087
Conversation
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
1c205b7
to
ccfa1a2
Compare
Size Change: +44 B (0%) Total Size: 1.16 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR moves revenue tracking from web analytics to data management, improving accessibility and discoverability. Here's a concise summary of the key changes:
- Added new
/data-management/revenue
route and tab in DataManagementScene for revenue tracking configuration - Added
ProductIntroduction
component in/frontend/src/scenes/data-management/revenue/RevenueEventsSettings.tsx
for better empty state UX - Critical bug in
/frontend/src/scenes/data-management/revenue/revenueEventsSettingsLogic.ts
whereaddEvent
reducer logic would prevent adding new events - Added settings gear icon in
WebOverview.tsx
linking to revenue configuration for revenue-related metrics - Removed revenue tracking from web analytics settings section in
SettingsMap.tsx
for better organization
The changes improve the feature's accessibility for marketing analytics use cases, but the addEvent
reducer bug needs to be addressed before merging.
9 file(s) reviewed, 8 comment(s)
Edit PR Review Bot Settings | Greptile
frontend/src/scenes/data-management/revenue/revenueEventsSettingsLogic.ts
Outdated
Show resolved
Hide resolved
frontend/src/scenes/data-management/revenue/RevenueEventsSettings.tsx
Outdated
Show resolved
Hide resolved
…ngs.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
thingName="revenue event" | ||
description="Revenue events are used to track revenue in Web analytics. You can choose which custom events PostHog should consider as revenue events, and which event property corresponds to the value of the event." | ||
isEmpty={events.length === 0} | ||
action={() => buttonRef.current?.click()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a lovely hack :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It actually feels pretty nice in the UI as well - the taxonomic popover opens upwards so even if you click the ProductIntro's button, your mouse will be over the list of events
Problem
This was hidden in web analytics settings, but if it's going to be used elsewhere (e.g. marketing analytics) then it makes sense for it to be somewhere more common
Changes
In menu bar:
![Screenshot 2025-01-30 at 13 36 13](https://private-user-images.githubusercontent.com/2056078/408141720-9d56a4af-595d-47d7-aa46-c1db0ae04d34.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc3OTIsIm5iZiI6MTczODg5NzQ5MiwicGF0aCI6Ii8yMDU2MDc4LzQwODE0MTcyMC05ZDU2YTRhZi01OTVkLTQ3ZDctYWE0Ni1jMWRiMGFlMDRkMzQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDMwNDUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDcyNWZmNWFiNDQyMTIxNmE0Yzc3ZmI5ODdjZTY4ODMyNDViY2RhMWM3MmRjMzE5ZWVkYzU4NDY5MjJlN2Q3OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.yA6z3UVcocjdojY-82-dxjqyIYebup8S8zJzK9_75sE)
New empty state:
![Screenshot 2025-01-30 at 13 36 25](https://private-user-images.githubusercontent.com/2056078/408141776-70aa2c11-0873-4f5c-9bf5-34b932821ef1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc3OTIsIm5iZiI6MTczODg5NzQ5MiwicGF0aCI6Ii8yMDU2MDc4LzQwODE0MTc3Ni03MGFhMmMxMS0wODczLTRmNWMtOWJmNS0zNGI5MzI4MjFlZjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDMwNDUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDk2MzZiMzllNzhmMzQzYTlkM2E2MzZiNWU2ZGNkNWFhNjRkOWYxMWIwZmZjZTBlZGUyNWRmYjM3MTE5YTQ3OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.NedjFuiuL31s8pzGkFuKvUNHve105EpPbZbEfySkctI)
Settings in web analytics
![Screenshot 2025-01-30 at 13 36 54](https://private-user-images.githubusercontent.com/2056078/408141906-c13b0f6c-e2db-4201-ba26-5b7093f25349.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4OTc3OTIsIm5iZiI6MTczODg5NzQ5MiwicGF0aCI6Ii8yMDU2MDc4LzQwODE0MTkwNi1jMTNiMGY2Yy1lMmRiLTQyMDEtYmEyNi01YjcwOTNmMjUzNDkucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDMwNDUyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OWUwYTUyYzk1MzcyNTgyY2QwYWRmMDhlZDE2NzQ1NzAwMGM2ZGNiYzIyZDNlZDZhZWQwMTJkNDYwYjcwOTViMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.XW7DeesEi2yhaqW0xggoWdP4QSi-8KcEGN93QliKnbo)
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Ran locally, took screenshots :)