Commit c996c4f
fix: aggregation (#30)
* feat: add aggregation support for custom event tracking
- Add aggregation parameter (day/week/month) to custom events API endpoint
- Implement aggregation logic in service layer for custom events
- Add helper methods for weekly and monthly aggregation of custom events
- Create comprehensive test suite (9 tests) for custom event aggregation
- Ensure custom events are grouped by dashboard aggregation setting
- All 18 aggregation tests pass (9 dashboard + 9 custom events)
This allows users to view custom event data aggregated by day, week, or
month, matching the behavior of regular analytics events.
* fix: pass aggregation parameter from frontend to custom events API
The custom events timeseries API was not receiving the aggregation
parameter from the frontend, causing it to always default to daily
aggregation regardless of the user's selection.
Changes:
- Add aggregation parameter to custom events API call
- Update chart time unit based on aggregation (day/week/month)
- Dynamically adjust chart display format for different aggregations
Now when users change the aggregation period, custom events will
properly group by day, week, or month matching the regular events.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5423487 commit c996c4f
1 file changed
+22
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
671 | 677 | | |
672 | 678 | | |
673 | 679 | | |
| |||
718 | 724 | | |
719 | 725 | | |
720 | 726 | | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
721 | 739 | | |
722 | 740 | | |
723 | 741 | | |
| |||
754 | 772 | | |
755 | 773 | | |
756 | 774 | | |
757 | | - | |
| 775 | + | |
758 | 776 | | |
759 | | - | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
760 | 780 | | |
761 | 781 | | |
762 | 782 | | |
| |||
0 commit comments