improved

Advanced Metrics

We have released a new set of features for Custom Metrics. You can now:

  • Use custom formulas for a metric value, incorporating aggregations, operators, and any schema field,
  • Define multiple aggregations per metric;
  • Exclude or include the current event from an aggregation calculation.

This unlocks a wide range of new use cases, including:

  • Ratio metrics:

    • Calculate how the transaction amount compares to usual transactions for a user current transaction / avg(transaction) [per user]
    • Detect suspicious login activity by calculating the ratio of failed to succeeded loginsfailed logins / succeeded logins per user or the ratio of logins outside of usual countries logins outside of US / total logins
    Metric to calculate ratio

    Metric to calculate ratio


  • Time difference between events to detect quick actions:

    • Detect if a transaction was attempted immediately after logintransaction [attempted] timestamp - last(successful login timestamp)
    • Detect if a profile update was attempted immediately after loginprofile update [attempted] timestamp - last(successful login timestamp)
    Metric to calculate time difference between events

    Metric to calculate time difference between events


  • Threshold calculations for a policy acting as a limiter:

    • Set a limit on the transaction amount allowed per day transaction [attempted] amount + sum(transaction [succeeded] amount)
    Metric to calculate total amount of transaction to set limit

    Metric to calculate total amount of transaction to set limit


You can find more details on the updated metrics documentation along with examples in the advanced metrics guide.

New formula bar for metric value definition

New formula bar for metric value definition