Skip to content

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 ​

FieldTypeRequiredDescription
namestringyesDimension name
descriptionstringnoDimension context
identifiersDimensionIdentifier[]yesProperty filters

Dimension Identifier ​

FieldTypeRequiredDescription
propertystringyesTarget group property
groupstringyesTarget group
equalsstring, number, booleannoExact match filter
notstring, number, booleannoNegative match filter
containsstringnoString contains filter
notContainsstringnoString does not contain filter
instring[], number[], boolean[]noValue in list filter
notInstring[], number[], boolean[]noValue not in list filter
startsWithstringnoString prefix filter
endsWithstringnoString suffix filter
ltnumbernoLess than filter
ltenumbernoLess than or equal filter
gtnumbernoGreater than filter
gtenumbernoGreater 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