-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Support coupon
s for Revenue Analytics
#33771
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
Conversation
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
Added support for coupon analytics in Revenue Analytics, enabling filtering and breakdown by both event-specific coupons and initial customer coupons in PostHog.
- Implemented taxonomy support for four new coupon properties:
coupon
,coupon_id
,initial_coupon
, andinitial_coupon_id
intaxonomy/taxonomy.py
- Enhanced
LemonInputSelect
component to support tooltips on dropdown options for better UX when selecting coupon filters - Added coupon-related query support in HogQL by extending
RevenueAnalyticsInvoiceItemView
andRevenueAnalyticsCustomerView
with proper Stripe invoice data extraction - Fixed critical issue in
new_option_for_filters_and_group_by.md
guide where subquery variable assignment was removed without alternative - Extended RevenueAnalytics schema and insights query runner to handle new coupon grouping and filtering capabilities
13 files reviewed, 5 comments
Edit PR Review Bot Settings | Greptile
products/revenue_analytics/guides/new_option_for_filters_and_group_by.md
Outdated
Show resolved
Hide resolved
products/revenue_analytics/backend/hogql_queries/revenue_analytics_insights_query_runner.py
Outdated
Show resolved
Hide resolved
Size Change: +318 B (+0.01%) Total Size: 2.57 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.
Really nice PR to review EOD 🚀
📸 UI snapshots have been updated 800016 snapshot changes in total. 0 added, 16 modified, 0 deleted:
Triggered by this commit. |
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.
IMO this could have been 2 separate PRs (ci changes and everything else) but LGTM
This could be achieved with `labelComponent` but it's much easier to achieve with a custom prop
We can now filter/breakdown both by the coupon in a specific revenue event, but also the initial coupon used by a person on their first invoice.
We can make this much simpler by extracting some of the logic to some different methods
This avoids the need to run this twice: dagster AND backend
2baccfa
to
afefcfe
Compare
ee8def8
to
3a4b4fd
Compare
We can now filter/breakdown both by the coupon in a specific revenue event, but also the initial coupon used by a person on their first invoice.