Behavioral cohort block

  • Updated

Use a behavioral cohort block to select a subset of a dataset based on observed behavior and other properties of the dataset's records. Determine the behavior of a dataset's record by the events linked with the entity. Behavioral cohorts can represent complex sequences and extensively accommodate the following categories of criteria:

oa-behblock.png

Add a filter or property filter

This definition filters dataset records by their property values. The left side of the filter can reference a dataset property, such as a column or derived column, another block, or a parameter. Similarly, the right side can reference any of these or a constant value. Comparison operators used in each condition are as follows. Note that when working with string data, comparison semantics are case-insensitive.

  • is – Checks if the left side equals the right side.
  • is not – Checks if the left side does not equal the right.
  • contains – Determines if the left side string contains the right side as a substring.
  • in – Verifies if the left side is present within the set of values on the right side.
  • <, >, >=, ... – Applies mathematical operators.

Comparing properties may include catalog properties such as columns, derived columns, blocks, values, or parameters.

oa-met-filter.png

Add a single behavior

Apply a filter to the dataset to extract records associated with specific events. Use a condition to define the filtering criteria and an aggregate filter to select events that meet the specified criteria.

The condition section lets you select dataset records based on the presence or absence of a specific event. For example, you can filter records for those who performed or did not perform a checkout event. This section includes the following filters:

  • Event Selector – Select specific events or broad event categories, like an event stream.
  • Event Filter – Narrow your focus to a specific set of events.
  • Time Filter – Filter events by their occurrence time, with three modes.
    • Relative – Define a time window based on the current date, such as the last three months.
    • Absolute – Set a time window based on specific dates and, optionally, the time of day.
    • Relative to Event – Filter events based on the duration between an event and a baseline event or timestamp, such as within two weeks after the first onboarding event.

Use the aggregate filter (where) to limit dataset records to those where the aggregate of matching events meets a specific condition. Apply the aggregation process to the designated property of matching events. Use operators to combine multiple aggregate filters.

oa-met-add-sing.png

Add a sequence

A sequence selects a dataset record if it has matching events in the specified order and meets any associated filter criteria. Each sequence stage is defined by an event selection, an optional filter, and a time filter.

  • Event Selector – Select specific events or broad event categories, such as an event stream.
  • Event Filter – Narrow the selection to specific events.
  • Time Filter – Filter events by when they occur. This filter has the following three modes:
    • Relative – Set a time window relative to the current time, such as the last three months or all time.
    • Absolute – Set a time window based on specific dates and, optionally, time of day.
    • Relative to Event – Filter events based on the time between an event and a baseline event or timestamp.
  • Under Advanced options, you can also set Holding Property Constant and hold a property constant, such as subscription_tier, across analyzed events, ensuring they occur within a single session.
oa-met-add-seq.png

Add a group

Compose any combination of previous criteria or other groups by clicking More > Convert to a Group.

oa-met-group.png

Example

To create a metric for users who made a purchase in the last 30 days,

  1. Select the Users dataset as the actor.
  2. Select Make Purchase in the Select events drop-down list.
  3. Add a time filter and set the time grain to the last 30 days.
  4. Click Run.
oa-beh-cohort.png

Output

The output of the behavioral cohort block is a Boolean value.