Tracker Specification

Learn about the Journium Insight Tracker specification. Irrespective of how a tracker is created or maintained, it is always stored as a YAML file.

A Journium InsightTracker is defined using a structured YAML format that follows the Journium InsightTracker schema.

Top-Level Properties

Prop

Type

metadata Properties

Prop

Type

spec Properties (LLM Tracker)

Prop

Type

trigger Properties

Prop

Type

data Properties

Prop

Type

Examples

Full Example

.journium/trackers/signup-to-first-habit.yml
apiVersion: journium.app/v0Alpha
kind: InsightTracker
metadata:
  name: signup-to-first-habit
  displayName: Signup to First Habit Dropoff
  description: Track how many users sign up but don't complete their first habit
spec:
  type: LLM
  trigger:
    mode: automatic
  llmPrompt: |
    You are a helpful assistant that generates insights based on the provided data.
    The data is a list of events that have occurred in the system.
    Generate an insight based on the data.
    The insight should be a single sentence that summarizes the data.
    The insight should be in the following format:
    - **[Insight Title]**: [Insight Description]
  data:
    events:
      - signup_completed
      - habit_created
    minEvents: 1
    maxEvents: 100

Snippets

The following snippets describe each configuration option in the tracker specification.

Execution schedule

You can configure the schedule for the tracker to run on.

Preset cadence

Valid presets are: hourly, daily, weekly, monthly.

.journium/trackers/my-tracker.yml
spec:
  trigger:
    mode: automatic
    schedule: daily

Cron expression

In the example below, the tracker will run every 45 minutes. The cron expression is a string that follows the format of the cron expression parser.

.journium/trackers/my-tracker.yml
spec:
  trigger:
    mode: automatic
    schedule: 
      cron: "*/45 * * * *"

Manual Schedule

For trackers in manual mode, the tracker will not run automatically. It will only run when explicitly triggered. You can trigger a tracker manually from the Journium UI.

.journium/trackers/my-tracker.yml
spec:
  trigger:
    mode: manual

Event selection and limits

You can specify the events to include in the tracker and the limits on the number of events to process.

Process a set of events

The example below will process the signup_completed and habit_created events.

.journium/trackers/my-tracker.yml
spec:
  data:
    events:
      - signup_completed
      - habit_created

Process all events

The example below will process all events.

.journium/trackers/my-tracker.yml
spec:
  data:
    events: "*"

Minimum number of events

The example below will execute only if at least 50 events are available.

.journium/trackers/my-tracker.yml
spec:
  data:
    minEvents: 50

Maximum number of events

The example below will select at most 100 events. Remaining events will be ignored in the current execution.

.journium/trackers/my-tracker.yml
spec:
  data:
    maxEvents: 100

LLM Prompt

The LLM prompt is used to generate the insight. As a best practice, you should use the | character to define a multi-line string. Consider the following example:

.journium/trackers/my-tracker.yml
spec: 
  llmPrompt: |
    You are a helpful assistant that generates insights based on the provided data.
    The data is a list of events that have occurred in the system.
    Generate an insight based on the data.
    The insight should be a single sentence that summarizes the data.
    The insight should be in the following format:
    - **[Insight Title]**: [Insight Description]

Best practices

  • Consider keeping the LLM prompt concise and to the point.
  • Try to acheive a single goal per tracker.
  • Configure different trackers for different goals.

Last updated on

On this page