Appearance
Dimension Schema ​
Dimensions allow you to specify segments that can be associated with your events. For example, you can have dimensions for Free
& Paid
plans to specify behaviors associated with free teams vs. paid teams.
Configuration ​
Dimension ​
Field | Type | Required | Description |
---|---|---|---|
name | string | yes | Dimension name |
description | string | no | Dimension context |
identifiers | DimensionIdentifier[] | yes | Property filters |
Dimension Identifier ​
Field | Type | Required | Description |
---|---|---|---|
property | string | yes | Target group property |
group | string | yes | Target group |
equals | string , number , boolean | no | Exact match filter |
not | string , number , boolean | no | Negative match filter |
contains | string | no | String contains filter |
notContains | string | no | String does not contain filter |
in | string[] , number[] , boolean[] | no | Value in list filter |
notIn | string[] , number[] , boolean[] | no | Value not in list filter |
startsWith | string | no | String prefix filter |
endsWith | string | no | String suffix filter |
lt | number | no | Less than filter |
lte | number | no | Less than or equal filter |
gt | number | no | Greater than filter |
gte | number | no | Greater than or equal filter |
Example ​
yaml
dimensions:
- name: Free
description: Teams without a paid plan.
identifiers:
OR:
- property: Plan
group: Team
equals: FREE
- property: Plan
group: Team
equals: TRIAL
- name: Paid
description: Teams with a paid plan.
identifiers:
AND:
- property: Plan
group: Team
not: FREE
- property: Plan
group: Team
not: TRIAL
- name: Member
description: Users with the member role.
identifiers:
OR:
- property: Role
group: User
equals: Member
- name: Admin
description: Users with the admin role.
identifiers:
OR:
- property: Role
group: User
equals: Admin
Associating dimensions with events ​
The point of dimensions is to provide context as to which behaviors are associated with which types of users. As such, dimensions have to be associated with events.
When an event does not specify dimensions, it is assumed that the event is capable of being triggered by users in each dimension. When specifying dimensions however, you have to choose whether to specify the specific dimensions that are included, or the specific dimensions to exclude from the list of all dimensions.
yaml
events:
# Exclusive dimensions
add_user:
- name: Add User
description: Triggered when an admin adds a user to their team.
dimensions:
excluded:
- Free
- Member
# Inclusive dimensions
add_user:
- name: Add User
description: Triggered when an admin adds a user to their team.
dimensions:
included:
- Paid
- Admin