Skip to content

StreamTarget

Defined in: protocol.ts:36

Everything needed to address one island stream.

apiBase: string

Defined in: protocol.ts:38

Base URL of the embed API, e.g. https://api.sparkletree.io.


optional campaignId?: string

Defined in: protocol.ts:40


optional context?: Record<string, unknown>

Defined in: protocol.ts:51

Context snapshot (time, geo, weather, device). Serialised as JSON.


optional extra?: Record<string, string | undefined>

Defined in: protocol.ts:55

Extra params passed through verbatim (preview tokens, etc.).


island: "cta" | "hero"

Defined in: protocol.ts:42


organizationId: string

Defined in: protocol.ts:39


optional sessionId?: string

Defined in: protocol.ts:53

Conversation session id for copy continuity. Individual surfaces only.


optional surfaceId?: string

Defined in: protocol.ts:41


optional variantId?: string

Defined in: protocol.ts:49

Variant pinning (plan v1.1 §3.3). The provider resolves the variant ONCE per page view and pins it here for every later call. Without it, ε-greedy runs per request and a single page shows a mixed-variant creative — hero from one arm, CTA from another — which is not an experiment, it is noise.