https://www.growthbook.io/ logo
#announcements
Title
# announcements
r

rhythmic-chef-84815

03/02/2023, 3:02 PM
can I create a metric (mixpanel) where it counts as 1 for each 2 times it gets triggered?
f

future-teacher-7046

03/02/2023, 3:26 PM
Yes, I think you can do that with a custom aggregation. Instead of
sum(values)
, you can do something like (
Math.floor(sum(values)/2)
).
r

rhythmic-chef-84815

03/02/2023, 3:43 PM
I was about to test that, I first though this
Math.floor(values.length/2)
would work
f

future-teacher-7046

03/02/2023, 3:52 PM
Yeah, if the value is always 1 each time that should do the same thing.
19 Views