Skip to content

Analytics and experiments

Every visit and Event as Metrics you query, watch and test against, so each Play is read by its number and not by a hunch.

Nouns
5
Verbs
9
Events
8
Metric.query
You, to your agent

Which of the three LinkedIn test ads brought a lead in its first week?

curl -X POST "https://api.sb/leaseline.app/metrics/query?mode=try" \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"metric":"new-leads","shape":"trend","breakdown":"ad","window":"7d"}'
npx startup-builder do Metric.query --try --data '{"metric":"new-leads","shape":"trend","breakdown":"ad","window":"7d"}'
{
  "name": "do",
  "arguments": {
    "mode": "try",
    "code": "return await $.Metric.query({ metric: 'new-leads', shape: 'trend', breakdown: 'ad', window: '7d' })"
  }
}
import { $ } from 'startup-builder'

const result = await $.try.Metric.query({ metric: 'new-leads', shape: 'trend', breakdown: 'ad', window: '7d' })
Response
{
  "api": "https://api.sb/leaseline.app",
  "metric": {
    "$id": "https://api.sb/leaseline.app/metrics/new-leads",
    "$type": "Metric",
    "unit": "count"
  },
  "from": "2026-10-28",
  "rows": [
    {
      "ad": "late-rent",
      "value": 1,
      "series": [
        0,
        0,
        1,
        0,
        0,
        0,
        0
      ],
      "readable": false
    },
    {
      "ad": "owner-statement",
      "value": 0,
      "series": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "readable": false
    },
    {
      "ad": "renewal-notice",
      "value": 0,
      "series": [
        0,
        0,
        0,
        0,
        0,
        0,
        0
      ],
      "readable": false
    }
  ],
  "action": {
    "operation": "Metric.query",
    "mode": "try",
    "status": "done"
  }
}
Try mode reads, stores nothing and spends nothingAPI referenceIts Nouns

Nouns

NounWhat it is
VisitA Visit is one span of a Visitor’s Events on a startup’s Sites and Apps.
MetricA Metric is a named measure computed from Events or Entries, always derived and never typed in.
ExperimentAn Experiment is a test of a Hypothesis that varies copy or behavior through Flags and judges the variants by a primary Metric.
HypothesisA Hypothesis is a belief about a startup stated so it can be proved wrong, with the Metric and threshold that settle it.
DashboardA Dashboard is one unified view of a scope, rendered as Markdown for Agents, screens for Humans, and JSON for native clients.

Properties

The hub defines each Noun’s core Properties; Analytics and experiments adds the ones a sale needs.

Visit

PropertyTypeWhat it holdsDefined by
startedAtdatetimeWhen it began.The hub
acquisitionstringHow the Visitor arrived: search, AI answer, agent, referral, ad, or direct.The hub

Metric

PropertyTypeWhat it holdsDefined by
querytextHow it is computed. An agent never varies the Metrics it is judged by.The hub
unitstringThe unit, such as dollars or percent.The hub
statusstringOne of draft or defined.The hub
playPlay | nullThe Play it judges, so each Play is read by its own number.Analytics and experiments

Experiment

PropertyTypeWhat it holdsDefined by
variantsjsonThe variants and their split.The hub
decisionstringOne of ship, kill, or iterate.The hub
winnerRulestringDeclared before the first visit, so the winner is a rule, not a reading.Analytics and experiments
spendMoneyAd money on your account, kept apart from the budget for the work.Analytics and experiments

Hypothesis

PropertyTypeWhat it holdsDefined by
statementtextThe belief, in one sentence.The hub
kindstringOne of founding, the five slots (customer, problem, approach, switch, differentiation), or loop.The hub
parenthypothesisThe Founding Hypothesis a slot Hypothesis belongs to.The hub
verdictstringOne of Open, Testing, Supported, or Refuted.The hub
metricmetricThe Metric that settles it.The hub
thresholdstringThe Metric value that settles it.The hub
gradestringComputed: the strongest grade of its outside Evidence, None without any.The hub
versionintegerEach merged Change adds one; outputs cite it in their lineage.The hub

Dashboard

PropertyTypeWhat it holdsDefined by
scopestringWhat it views, such as a Studio, a startup, a Team, or a Role.The hub

Lifecycle

Every move names the Verb that makes it, or the Event it waits on.

Metric

StateWhat it meansMoves to
draft (first)Its query is written and not compiled, so nothing reads it.defined by Metric.define
definedIts query compiles against the startup’s Events and Entries; defining it again recompiles an edited query.None: it ends here.

Experiment

StateWhat it meansMoves to
draft (first)Its variants and Metrics are set, and no traffic is split yet.running by Experiment.start
runningTraffic is split across its variants while its Metrics are measured.concluded by Experiment.conclude
concludedIt ended with a Decision to ship, kill, or iterate.None: it ends here.

Hypothesis

StateWhat it meansMoves to
open (first)Stated with its Metric and threshold, and bound to no Experiment.testing by Hypothesis.test; dropped by Hypothesis.drop
testingAn Experiment that decides it is running.supported on Experiment.concluded; refuted on Experiment.concluded; dropped by Hypothesis.drop
supportedIts Experiment met the threshold; its outside Evidence grades how far that holds.testing by Hypothesis.test; dropped by Hypothesis.drop
refutedIts Experiment missed the threshold; a merged Change can restate it and test it again.testing by Hypothesis.test; dropped by Hypothesis.drop
droppedRetired from active work and kept on record with its Evidence.None: it ends here.

Verbs

VerbWhat it doesApproval
Metric.queryReads a number from your Events as a trend, funnel, retention curve or path, split by any property.Runs on its own On each site Bing, Facebook, Google Search, Google Display, YouTube, Google Business Profile, Instagram, LinkedIn, Reddit, TikTok, X
Metric.watchOpens a Task, or sends you a Message, the day a number crosses the line you set.Runs on its own
Experiment.startSplits traffic across your variants and starts measuring the primary and guardrail numbers.Runs on its own
Experiment.concludeEnds an Experiment with ship, kill or iterate, recorded as a Decision with its reason.Runs on its own
Dashboard.askAnswers a plain question with a query over your records, the query shown beside the answer.Runs on its own
Metric.defineCompiles a number from your Events and lists every Event it reads, so no one types it in.Runs on its own
Event.captureRecords one Event from your Site or product, such as a signup, so every number above can read it.Runs on its own
Hypothesis.testTies a Hypothesis to the Experiment that decides it, and marks it testing.Runs on its own
Dashboard.scheduleSends a Dashboard on a schedule to a Mailbox, a Channel or an agent’s context.Runs on its own

Events

EventEmitted by
Metric.queriedMetric.query
Metric.watchedMetric.watch
Metric.definedMetric.define
Experiment.startedExperiment.start
Experiment.concludedExperiment.conclude
Hypothesis.testedHypothesis.test
Dashboard.askedDashboard.ask
Event.capturedEvent.capture

A Trigger can start a Workflow on any of them, and a Watch delivers each to your endpoint, signed (Events and webhooks).

Who operates it

PartAnalytics and experiments
AccountableMarketing lead
Also calls its VerbsCustomer lead, Founder
SeatAn agent holds each seat until you seat a person in it.
Asks you firstNone of its Verbs: each runs within its seat’s Limits

Integrations

Google Analytics · Google Search Console

Import and export

DirectionWhatHow
ImportYour analytics historyIntegration.connect for Google Analytics; sessions come in as Visits
ExportAny number, as a seriesMetric.query, or Collection.export to your warehouse

Example

One number per Play, read every week.

  1. Event.capture records each signup from the site.
  2. Metric.define compiles “trials a week from cold email” from those Events.
  3. Metric.watch opens a Task the week it drops under 3.

Contents