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

feat(web-analytics): Move revenue tracking to data management #28087

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Jan 30, 2025

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

  • Move to data management
  • Add a better empty state

In menu bar:
Screenshot 2025-01-30 at 13 36 13

New empty state:
Screenshot 2025-01-30 at 13 36 25

Settings in web analytics
Screenshot 2025-01-30 at 13 36 54

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Ran locally, took screenshots :)

@posthog-bot
Copy link
Contributor

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

@robbie-c robbie-c force-pushed the feature/move-revenue-tracking-to-data-management branch from 1c205b7 to ccfa1a2 Compare January 30, 2025 14:08
Copy link
Contributor

github-actions bot commented Jan 30, 2025

Size Change: +44 B (0%)

Total Size: 1.16 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.16 MB +44 B (0%)

compressed-size-action

@robbie-c robbie-c marked this pull request as ready for review January 30, 2025 15:00
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 where addEvent 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

robbie-c and others added 2 commits January 30, 2025 15:06
…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()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a lovely hack :)

Copy link
Member Author

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

@robbie-c robbie-c merged commit 0234cae into master Jan 31, 2025
99 checks passed
@robbie-c robbie-c deleted the feature/move-revenue-tracking-to-data-management branch January 31, 2025 13:08
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