Headlessly

Analytics

Event, Metric, Funnel, Goal — insights and measurement.

Events captured via the browser SDK. Financial metrics derived from Stripe. Funnels track conversion flows. Goals track business objectives.

Event

Every tracked action — pageviews, API calls, sign-ups, CRM interactions, Stripe webhooks. Forwarded to GA/Sentry/PostHog and stored in the Iceberg R2 lakehouse.

import { Noun } from 'digital-objects'

export const Event = Noun('Event', {
  name: 'string!',
  type: 'string!',
  data: 'string',
  source: 'Browser | Node | API | Snippet',
  sessionId: 'string',
  userId: 'string',
  anonymousId: 'string',
  organization: '-> Organization',
  timestamp: 'datetime!',
  url: 'string',
  path: 'string',
  referrer: 'string',
  properties: 'string',
  update: null,
  delete: null,
})

Event is immutable — append-only. No updates, no deletes.

Metric

Real values — MRR, churn, NRR from Stripe; DAU, NPS from events.

export const Metric = Noun('Metric', {
  name: 'string!',
  value: 'number!',
  type: 'Counter | Gauge | Histogram | Summary',
  unit: 'string',
  dimensions: 'string',
  organization: '-> Organization',
  timestamp: 'datetime',
})

Funnel

Conversion flows — visitor to signup to activate to pay.

export const Funnel = Noun('Funnel', {
  name: 'string!',
  description: 'string',
  steps: 'string',
  organization: '-> Organization',
  conversionRate: 'number',
})

Goal

Business objectives — revenue targets, user targets, milestone deadlines.

export const Goal = Noun('Goal', {
  name: 'string!',
  description: 'string',
  target: 'number!',
  current: 'number',
  unit: 'string',
  period: 'Daily | Weekly | Monthly | Quarterly | Yearly',
  status: 'OnTrack | AtRisk | Behind | Achieved',
  organization: '-> Organization',
  achieve: 'Achieved',
})
VerbEventDescription
achieveAchievedMark goal as achieved

On this page