Goals and funnels

Goals

A goal is something a session can reach. Goals are evaluated on the server whenever a session changes and stored on the session (goals[]), so goal filters and conversion rates are as fast as any other filter.

Match kindReached whenExample
eventan event with this name (and, optionally, these exact prop values) happened{"kind": "event", "event": "signup", "props": {"plan": "pro"}}
pagea pageview of this page (exact) or below it (prefix){"kind": "page", "page": "/thank-you", "mode": "exact"}
leada lead / identify() is linked to the session (optionally of one form){"kind": "lead", "form": "contact"}
conversiona server-side conversion is linked (optionally of one definition){"kind": "conversion", "definition": "booking"}

Fields: key (snake_case, stable), name, match, isConversion (counts into converted and the conversion rate), role (lead, contact or step, see below), value (per converting session, in the project currency), sort, archived.

curl -X POST https://api.3x.example/v1/projects/$PROJECT/goals \
  -H "Authorization: Bearer $X3_SECRET_KEY" -H "Content-Type: application/json" \
  -d '{"key":"demo_booked","name":"Demo booked","match":{"kind":"event","event":"booking"},"isConversion":true,"value":250}'

Roles: inquiry, contact attempt, step

Every goal has a role (set by „Lead festlegen“, lead_setup_apply or role in the goal body):

RoleIn the appCounts as
leadAnfragea lead, once per person, also without contact data (forms, bookings, thank-you pages)
contactKontaktversucha separate number: clicks on WhatsApp, phone, e-mail and external booking pages such as Doctolib. Never part of the cost per lead, never sent to ad platforms by itself
stepNicht zählennothing: funnel steps and micro goals

Without a role in the body the server picks the default: contact clicks are contact, conversion goals and lead matches are lead, everything else step. Only a role a person chose counts as a lead (roleConfirmed: true: „Lead festlegen“, the goal wizard, or role in the body); a default role stays a proposal. The counting happens when reports are read, never by writing lead rows: a visit that reached a confirmed lead goal counts once per person when the person has no lead row; a lead row (identify, POST /leads, also one marked as spam) always wins. Project setting leadCounting is rows_and_goals (new projects, and existing ones after the automatic switch with its timeline note, which counts from leadCountingSince on, so no past number changes); rows counts lead rows only. A lead row without a visit (server-side POST /leads) cannot be matched to the visit of its form: send session_id with it or make that form goal a step. Phone goals are canonically {"kind":"event","event":"click","props":{"kind":"tel"}}; the older form with props.href "tel:…" is the same goal. See Lead setup for the guided flow.

Inquiries counted from a goal have no contact data. The leads inbox lists them as „Anfrage ohne Kontaktdaten“ with way, source and entry page (GET /v1/projects/{project}/lead-setup/inquiries?from=&to=, analytics:read, at most 500, newest first); recording the real conversation turns one into a lead with contact data. GET /v1/projects/{project}/lead-setup/state returns the open setup points and hand-off links without scanning the site (the Pulse rows „Wartet auf Einbau“).

New projects start with three conversion goals: form_submit, booking and lead. A quiz funnel preset uses quiz_submit and booking instead.

Changing goals bumps the project's goal version; a background job re-evaluates existing sessions (the same rescoring job as for relevance), so reports reflect the new definition retroactively.

Filters: goal=demo_booked (repeatable, all must be reached), converted=true|false. Breakdown dimension goal. MCP tool analytics_goals and REST GET …/analytics/goals return per goal the sessions reaching it, the rate and the value sum.

Funnels

A funnel is an ordered list of 2–20 steps. Step kinds:

KindStep reached when
sessionsalways (use as the first step: every session of the filter)
eventan event with this name (and props)
pagea pageview of the page (exact / prefix)
goalthe goal is reached
answeredat least count distinct questions of a questionnaire were answered
funnel_stepx3.funnelStep(funnel, step) was called with this step key

Modes:

  • independent – each step counts sessions that reached it, regardless of order; the share is relative to step 1. Quiz funnels with optional steps use it.
  • sequential – a session counts for step n only if it reached steps 1…n−1 earlier in the session. Use it for real conversion paths.

Every step reports sessions, share of step 1 and rate from the previous step. One funnel per project is the default funnel shown on the overview.

Analysing a funnel over time

Funnels are computed from the raw visits at query time, so a changed definition counts the same way in every range – comparisons stay like for like. Every funnel view takes the same settings (REST query string, MCP arguments, dashboard Verhalten → Funnels):

SettingValuesDefault
ordersequential (strict order, other things may happen in between), any (all steps up to here, any order), independent (each step on its own)the funnel's mode
unitsession, visitor (across days only with consent – the first-party id; otherwise the daily hash, same day only), journey (visits X3 links to one person)session
windowconversion window in seconds from the first step (60 s … 90 days)the visit; 7 days for visitor/journey
include_testtest traffic, as everywhereoff

Segment filters describe the entry visit of a unit; later visits of the same person count for later steps (never test traffic), up to the window after the range.

ViewRESTWhat it answers
StepsGET …/analytics/funnelUnits per step, overall rate with interval; with compare=previous|previous_year|custom (compare_from, compare_to) the comparison per step
TrendGET …/analytics/funnel/trend?bucket=day|week|monthUnits entering and reaching each step per bucket, the comparison aligned bucket by bucket
What changedGET …/analytics/funnel/changesTransitions of the whole funnel and the segments (channel, campaign, device, browser, country, landing page, new/returning) with the biggest change, ranked by impact
BreakdownGET …/analytics/funnel/breakdown?dimension=The funnel per channel, utm_*, ad_campaign, ad, device, browser, OS, country, entry_page, visitor_type, experiment_arm (with the experiment filter), relevance_tier
CohortsGET …/analytics/funnel/cohorts?days=7By week of the first step: how many reached each step within N days (mature once the full time has passed)
TimingGET …/analytics/funnel/timingTime between steps and overall: median, p75, p90, distribution
Drop-offGET …/analytics/funnel/dropoff?step=Who reached the step before but not this one: next pages, exit pages, time before leaving, and the funnel_step filter of these visits

Honest changes

A change of a rate comes with the 95 % interval of the difference (Newcombe, from the Wilson intervals of both rates) and a verdict: better or worse only when the interval excludes 0, unclear otherwise, too_few while either base is below 30. „What changed“ compares many segments and therefore uses 99 % intervals and a base of at least 20 in both ranges. Warnings name comparison ranges before the first data, steps that appear or vanish (tracking changed?) and funnel definitions changed within the range.

The visits behind a step

The filter funnel_step=<funnel>:<step>:reached|dropped[:order] selects the visits that reached a step, or reached the step before but not this one – in every view that filters visits (sessions, recordings, mass replay, heatmaps, MCP sessions_list). See Filters.

{
  "key": "signup",
  "name": "Signup",
  "mode": "sequential",
  "steps": [
    { "key": "visit", "label": "Sessions", "match": { "kind": "sessions" } },
    { "key": "pricing", "label": "Pricing page", "match": { "kind": "page", "page": "/pricing", "mode": "exact" } },
    { "key": "form", "label": { "en": "Form started", "de": "Formular begonnen" }, "match": { "kind": "event", "event": "form_start" } },
    { "key": "done", "label": "Signed up", "match": { "kind": "goal", "goal": "signup" } }
  ]
}

Questionnaires (quizzes)

A questionnaire describes a quiz or multi-step form: questions with option values and labels. The quiz preset events (quiz_view, quiz_answer {variant, q, value}, quiz_contact, quiz_submit) reference it by its id (variant). With tracking.questionnaires.strict, answers that do not match a registered question and option are dropped at ingest – no free text can slip in.

GET …/analytics/answers (MCP analytics_answers) returns, per questionnaire, the funnel (viewed, started, contact, submitted) and the distribution of the last answer per session and question, in definition order with labels.

Where to define them

Dashboard Settings → Goals / Funnels / Questionnaires, REST (goals.*, funnels.*, questionnaires.* in the API reference), or MCP (goals_create, funnels_create, questionnaires_upsert, …).