Surface docs

Objects

The fields of the objects the tools return.

Dates are ISO 8601 strings. A tool's result wraps these objects as its reference shows, e.g. surface_get returns { surface: Surface, dashboard_url }.

Surface

One page placement that serves variants.

FieldTypeDescription
idintegerThe surface_id every tool takes.
namestringUnique within the organization.
descriptionstringFree text.
paradigmRANKING | VARIANT_SELECTIONHow variants are chosen.
statusACTIVE | ARCHIVEDArchived surfaces stop serving and don't count toward plan limits.
live_stateLIVE | STALE | NOT_INSTALLEDNOT_INSTALLED until the snippet first reports in; LIVE if it reported in the last 7 days; otherwise STALE.
page_urlstringThe page the surface runs on.
edge_routestringThe /api/<route> the surface serves on.
edge_urlstringThe URL the snippet fetches variants from.
locationWORLDWIDE | UNITED_STATES | EUROPE | ASIA_PACIFICServing region.
segments_enabledbooleanWhether segments give audiences their own variants.
organization{ id, name }The organization that owns the surface.
first_integration_atstring | nullWhen the snippet first reported in.
last_seen_atstring | nullWhen the snippet last reported in.
created_atstringCreation time.
updated_atstringLast change.

Variant

One version of a surface's content.

FieldTypeDescription
idintegerThe variant_id that variant tools take.
raw_contentsstringJSON object of field key to value, e.g. {"headline": "…"}.
statusDRAFT | ACTIVE | PAUSED | ARCHIVEDOnly ACTIVE variants are served; only DRAFT variants can be edited.
is_controlbooleanThe page's current copy, which the others are measured against. One per segment.
segmentSegment | nullThe audience this variant serves; null for everyone.
created_atstringCreation time.

Segment

An audience with its own variants, matched by a query parameter or a path pattern.

FieldTypeDescription
idintegerThe segment_id a variant takes in variant_create.
namestringUnique within the surface.
match_typeQUERY_PARAM | PATH_VARIABLEHow visitors are matched.
param_keystringQUERY_PARAM: the query parameter, e.g. utm_source.
param_valuestringThe value that matches.
path_patternstringPATH_VARIABLE: the path pattern with one capture.
surface_idintegerThe surface it belongs to.
created_atstringCreation time.

Test

The bandit test a surface runs; surface_results reports the most recently started.

FieldTypeDescription
idintegerThe test id.
namestringe.g. "Pricing hero — Book Demo Click".
event_typestringThe goal event it optimizes.
target_metricRATE_PER_SESSION | TOTAL_EVENTSWhat counts as better.
target_policyMAXIMIZE | MINIMIZEWhich direction is better.
startstringWhen the test started.

VariantResult

One variant's results in the latest test.

FieldTypeDescription
variant_idintegerMatches Variant.id.
is_controlbooleanWhether it is the control.
contentsobjectThe variant's field values, parsed.
sessionsintegerSessions that were served this variant.
sessions_w_eventintegerOf those, sessions that reached the goal.
rate_per_sessionnumbersessions_w_event / sessions.
win_probabilitynumberThe bandit's estimated chance this variant is best, 0–1.

Termination

The bandit's own judgement on whether the test is done.

FieldTypeDescription
should_terminatebooleanTrue when one variant is clearly best.
estimated_winner_ctrnumberThe leading variant's estimated goal rate.
value_remaining_pctilenumberThe potential value remaining from running the test longer.

Traffic

All-time events for a surface, as the Analytics page shows them.

FieldTypeDescription
alltime_session_countintegerSessions that rendered the surface.
event_stats{ [event_type]: { count, avg_count_per_session, rate_per_session } }Per event: total count, average per session, and the share of sessions with at least one.

On this page