mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
Tally up counts of filters on events and actions (#4214)
* tally up counts of filters + actions * update comment Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
This commit is contained in:
parent
7c9c3a41cb
commit
5377600dcf
@ -163,6 +163,21 @@ export const eventUsageLogic = kea<
|
||||
|
||||
properties.total_event_actions_count = (properties.events_count || 0) + (properties.actions_count || 0)
|
||||
|
||||
let totalEventActionFilters = 0
|
||||
filters.events?.forEach((event) => {
|
||||
if (event.properties?.length) {
|
||||
totalEventActionFilters += event.properties.length
|
||||
}
|
||||
})
|
||||
filters.actions?.forEach((action) => {
|
||||
if (action.properties?.length) {
|
||||
totalEventActionFilters += action.properties.length
|
||||
}
|
||||
})
|
||||
|
||||
// The total # of filters applied on events and actions.
|
||||
properties.total_event_action_filters_count = totalEventActionFilters
|
||||
|
||||
// Custom properties for each insight
|
||||
if (insight === 'TRENDS') {
|
||||
properties.breakdown_type = filters.breakdown_type
|
||||
|
Loading…
Reference in New Issue
Block a user