Intempt Docs
Developer DocsCLI

intempt.yaml

The tracking plan file: project settings, event definitions, property types, and identify and group blocks.

intempt.yaml

One file describes your whole tracking plan. intempt generate reads it to write typed wrappers, intempt validate checks it, and intempt status compares it against your source.

Example

version: 1
project: my-app
organization: acme
source: default
platform: browser-ts
sdk: "@intempt/browser"
output: ./src/intempt

events:
  signup:
    description: User creates an account
    properties:
      method:
        type: string
        required: true
        enum: [email, google, apple]
      referral_code:
        type: string

  purchase:
    description: User completes a purchase
    properties:
      total:
        type: number
        required: true
      currency:
        type: string
        required: true
      payment_method:
        type: string
        enum: [card, paypal, bank_transfer]

identify:
  properties:
    email:
      type: string
      required: true
    name:
      type: string

Top-level fields

FieldDescription
versionSchema version. 1
projectIntempt project slug
organizationIntempt organization slug
sourceSource name events are attributed to
platformOne of the 15 supported platforms. Decides which wrapper gets generated
sdkThe SDK package the generated wrapper imports
outputDirectory the generated wrapper is written to

Events

Each key under events is an event name. Each event takes an optional description and a map of properties.

Property types

TypeNotes
stringConstrain the allowed values with enum
number
integer
boolean
date
arrayDescribe the element shape with items
objectDescribe the shape with a nested properties map

Every property also takes:

FieldDescription
requiredWhether the property must be present. Generated types make required properties non-optional
enumAllowed values, for a closed set
descriptionFree text, carried into the generated code
itemsElement definition, for array
propertiesNested definition map, for object

Because required and enum reach the generated types, a missing property or a value outside the enum is a compile error in your editor rather than a wrong row you find in a report later. That is the point of generating the wrapper instead of calling the SDK directly.

identify and group

Both take the same properties map as an event, plus an optional description. identify describes the traits you set on a user, group the traits you set on an account.

identify:
  properties:
    email:
      type: string
      required: true

group:
  properties:
    plan:
      type: string
      enum: [free, pro, enterprise]

Validating

intempt validate

Checks required fields, property types, nesting, and reserved names. Run it before generate, and in CI if the plan is edited by more than one person.

On this page