Getting Started
Getting Started
Section titled “Getting Started”Installation
Section titled “Installation”macOS / Linux:
curl -fsSL https://opentp.dev/install | bashWindows (PowerShell):
irm opentp.dev/install.ps1 | iexnpm:
npm install -g opentpnpx (no install):
npx opentp validateQuick Start
Section titled “Quick Start”1. Create opentp.yaml
Section titled “1. Create opentp.yaml”Create a configuration file in your project root:
opentp: 2025-06
info: title: My App Tracking Plan version: 1.0.0
spec: events: key: pattern: "{area | slug}::{event | slug}" paths: events: root: /events pattern: "{area}/{event}.yaml" dictionaries: root: /dictionaries taxonomy: area: title: Area type: string required: true event: title: Event type: string required: true action: title: Action type: string required: true payload: platforms: all: [web, ios, android] schema: event_name: type: string required: true
transforms: slug: steps: - step: lower - step: trim - step: replace params: pattern: " " with: "_"2. Create Your First Event
Section titled “2. Create Your First Event”Create the folder structure and your first event file:
mkdir -p events/authopentp: 2025-06
event: key: auth::login_click
taxonomy: area: auth event: login_click action: User clicks the login button
payload: platforms: all: active: 1.0.0 history: 1.0.0: schema: event_name: value: login_click3. Validate
Section titled “3. Validate”Run validation to check your tracking plan:
opentp validateExpected output:
✓ All events are valid count=1Project Structure
Section titled “Project Structure”A typical OpenTrackPlan project looks like this:
my-tracking-plan/├── opentp.yaml # Main config├── events/ # Event definitions│ └── {area}/{event}.yaml└── dictionaries/ # Reusable enums ├── taxonomy/ │ └── areas.yaml └── data/ └── application_id.yamlIDE Support
Section titled “IDE Support”Add JSON schema references for autocompletion:
# yaml-language-server: $schema=https://opentp.dev/schemas/opentp.schema.jsonopentp: 2025-06...Available schemas:
https://opentp.dev/schemas/opentp.schema.json— main confighttps://opentp.dev/schemas/event.schema.json— eventshttps://opentp.dev/schemas/dict.schema.json— dictionaries
Next Steps
Section titled “Next Steps”- CLI Commands — learn all available commands
- Transforms — string transformation pipelines
- Rules — field validation rules