@picked/client 0.0.1-dev.1776647766999 → 0.0.1-dev.1776837084253

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/{api-i5hIjZ7M.js → api-6oxKA__k.js} +1 -1
  2. package/dist/{api-tt6bWMJv.cjs → api-CIC-Uysx.cjs} +1 -1
  3. package/dist/cjs/form/index.js +1 -1
  4. package/dist/cjs/index.js +2 -2
  5. package/dist/cjs/plugins/create-experience/index.js +1 -1
  6. package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
  7. package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
  8. package/dist/cjs/plugins/single-page-app/index.js +1 -1
  9. package/dist/cjs/plugins/web-components/index.js +1 -1
  10. package/dist/cjs/plugins/window-object/index.js +1 -1
  11. package/dist/cjs/server/index.js +1 -1
  12. package/dist/docs/actions.md +58 -0
  13. package/dist/docs/api/index.md +32 -0
  14. package/dist/docs/api-keys.md +33 -0
  15. package/dist/docs/conditions.md +52 -0
  16. package/dist/docs/experiences.md +33 -0
  17. package/dist/docs/features.md +51 -0
  18. package/dist/docs/fields.md +70 -0
  19. package/dist/docs/flow-builder/building-flows.md +61 -0
  20. package/dist/docs/flow-builder/condition-builder.md +54 -0
  21. package/dist/docs/flow-builder/keyboard-shortcuts.md +66 -0
  22. package/dist/docs/flow-builder/nodes.md +43 -0
  23. package/dist/docs/flow-builder/overview.md +43 -0
  24. package/dist/docs/index.md +79 -0
  25. package/dist/docs/pickedql/data-sources.md +98 -0
  26. package/dist/docs/pickedql/dimensions.md +23 -0
  27. package/dist/docs/pickedql/examples.md +249 -0
  28. package/dist/docs/pickedql/filtering.md +31 -0
  29. package/dist/docs/pickedql/index.md +35 -0
  30. package/dist/docs/pickedql/schema.md +123 -0
  31. package/dist/docs/pickedql/virtual-functions.md +121 -0
  32. package/dist/docs/projects.md +30 -0
  33. package/dist/docs/reference/index.md +11 -0
  34. package/dist/docs/reports.md +11 -0
  35. package/dist/docs/sdk/actions.md +37 -0
  36. package/dist/docs/sdk/conditions.md +137 -0
  37. package/dist/docs/sdk/content-security-policy.md +31 -0
  38. package/dist/docs/sdk/experiences.md +44 -0
  39. package/dist/docs/sdk/features.md +213 -0
  40. package/dist/docs/sdk/fields.md +263 -0
  41. package/dist/docs/sdk/index.md +74 -0
  42. package/dist/docs/sdk/plugins/create-experience.md +133 -0
  43. package/dist/docs/sdk/plugins/dynamic-experiences.md +59 -0
  44. package/dist/docs/sdk/plugins/index.md +9 -0
  45. package/dist/docs/sdk/plugins/window-object.md +20 -0
  46. package/dist/docs/sdk/predicates.md +113 -0
  47. package/dist/docs/sdk/steps.md +411 -0
  48. package/dist/docs/steps.md +35 -0
  49. package/dist/docs/team-management.md +40 -0
  50. package/dist/docs/tooling/chrome-extension.md +29 -0
  51. package/dist/docs/tooling/gtm-template.md +69 -0
  52. package/dist/docs/tooling/index.md +19 -0
  53. package/dist/docs/tooling/mcp.md +120 -0
  54. package/dist/docs/tooling/vite-plugin.md +82 -0
  55. package/dist/docs/workspaces.md +35 -0
  56. package/dist/esm/form/index.js +1 -1
  57. package/dist/esm/index.js +158 -284
  58. package/dist/esm/plugins/create-experience/index.js +1 -1
  59. package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
  60. package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
  61. package/dist/esm/plugins/single-page-app/index.js +28 -14
  62. package/dist/esm/plugins/web-components/index.js +1 -1
  63. package/dist/esm/plugins/window-object/index.js +1 -1
  64. package/dist/esm/server/index.js +1 -1
  65. package/dist/experience-CNIhapU2.js +136 -0
  66. package/dist/experience-CTEBY-it.cjs +1 -0
  67. package/dist/experience-instance-Cu8oGGr9.cjs +1 -0
  68. package/dist/experience-instance-DIpWYaA6.js +387 -0
  69. package/dist/nodes-2fst8XKi.js +101 -0
  70. package/dist/nodes-DBK4N9YY.cjs +1 -0
  71. package/dist/rules-logic-D7dL30U1.js +263 -0
  72. package/dist/rules-logic-DJhGFqhC.cjs +1 -0
  73. package/dist/types/plugins/single-page-app/plugin.d.ts +15 -4
  74. package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
  75. package/package.json +2 -2
  76. package/dist/experience-instance-DG9HFNSE.cjs +0 -1
  77. package/dist/experience-instance-DffMstSs.js +0 -486
  78. package/dist/object-C82v79xc.js +0 -25
  79. package/dist/object-CUJOjanb.cjs +0 -1
  80. package/dist/rules-logic-B--rEvGw.js +0 -240
  81. package/dist/rules-logic-D_dZ52-Q.cjs +0 -1
  82. /package/dist/{id-Bv44ilEo.cjs → id-Cg7fVl1O.cjs} +0 -0
  83. /package/dist/{id-CRqy981z.js → id-n2yrHvNo.js} +0 -0
  84. /package/dist/{logger-6z_gb4rA.js → logger-C44jSdYl.js} +0 -0
  85. /package/dist/{logger-fbvQC40v.cjs → logger-CJUj90QX.cjs} +0 -0
  86. /package/dist/{supports-0XIfd4-R.js → supports-B_trw6lj.js} +0 -0
  87. /package/dist/{supports-Dsjg-82e.cjs → supports-CKSVYpQx.cjs} +0 -0
@@ -0,0 +1,61 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Building flows
6
+
7
+ Build flows by dragging blocks onto the canvas, connecting nodes with arrows, and configuring each node in the inspector.
8
+
9
+ ## Add nodes
10
+
11
+ Drag a step, action, or condition from the entity browser onto the canvas. A new node appears where you drop it.
12
+
13
+ You can also drop a block directly onto an existing arrow. The node inserts inline — the original arrow splits into two arrows with the new node in between. A **+** indicator appears when you hover over a valid arrow.
14
+
15
+ ## Connect nodes
16
+
17
+ Click and drag from a node's output handle (right side) to another node's input handle (left side). An arrow appears connecting them.
18
+
19
+ The flow follows arrows from left to right, starting at the origin. Every node downstream of the origin is part of the experience flow.
20
+
21
+ ## Branch with conditions
22
+
23
+ Connect the origin (or any node) to a condition node. The condition evaluates its logic and routes the flow down one of two paths.
24
+
25
+ Connect the green (true) handle to the nodes that should run when the condition passes. Connect the red (false) handle to the alternative path. Either path can lead to more steps, actions, or further conditions.
26
+
27
+ ## Assign fields to steps
28
+
29
+ Drag a field from the entity browser and drop it onto a step node. The field is now assigned to that step.
30
+
31
+ You can assign multiple fields to a single step. The step node shows a count of assigned fields. To see which fields are assigned, select the step and check the **Assigned Fields** section in the inspector.
32
+
33
+ ## Select nodes
34
+
35
+ Click a node to select it. Its inspector opens in the right panel.
36
+
37
+ Drag on empty canvas to marquee-select multiple nodes. Press `Cmd/Ctrl+A` to select all nodes.
38
+
39
+ When multiple nodes are selected, the inspector shows a count and grouped list. Click any item in the list to navigate to its inspector.
40
+
41
+ ## Move nodes
42
+
43
+ Drag a selected node to reposition it. Nodes snap to the grid automatically.
44
+
45
+ Use arrow keys to nudge selected nodes. Hold `Shift` for larger nudges.
46
+
47
+ ## Delete nodes
48
+
49
+ Select one or more nodes and press `Delete` or `Backspace`. The nodes and their connected arrows are removed.
50
+
51
+ ## Duplicate nodes
52
+
53
+ Select one or more nodes and press `Cmd/Ctrl+D`. Copies appear offset from the originals.
54
+
55
+ ## Undo and redo
56
+
57
+ Press `Cmd/Ctrl+Z` to undo. Press `Cmd/Ctrl+Shift+Z` to redo. The undo stack tracks node additions, deletions, connections, and position changes.
58
+
59
+ ---
60
+
61
+ [Overview](/flow-builder/overview) · [Nodes](/flow-builder/nodes) · **Building Flows** · [Keyboard Shortcuts](/flow-builder/keyboard-shortcuts) · [Condition Builder](/flow-builder/condition-builder)
@@ -0,0 +1,54 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Condition builder
6
+
7
+ The condition builder is a visual rule editor used across the dashboard. It lets you define logic without writing code.
8
+
9
+ ## Where it appears
10
+
11
+ The condition builder is used in several places:
12
+
13
+ - **Condition nodes** — define branching logic in the [flow builder](/flow-builder/overview)
14
+ - **Experience conditions** — control when an experience activates for a visitor
15
+ - **Initialize open conditions** — control when an experience opens automatically on page load
16
+ - **Field option conditions** — show or hide individual options based on visitor state
17
+
18
+ ## Rule structure
19
+
20
+ Rules are organized into groups. Each group uses either **AND** (all rules must match) or **OR** (any rule must match).
21
+
22
+ A single rule has three parts:
23
+
24
+ 1. **Field** — the data source to evaluate
25
+ 2. **Operator** — how to compare (equals, not equals, greater than, contains, etc.)
26
+ 3. **Value** — the target value to compare against
27
+
28
+ You can nest groups inside other groups to create complex logic. For example, an AND group containing two OR groups.
29
+
30
+ ## Available data sources
31
+
32
+ When building rules, you can reference these data sources:
33
+
34
+ **Responses** — values visitors have submitted through form fields in the current experience. Each field you create in your project appears here by its name.
35
+
36
+ **Actions** — references to actions that have been triggered during the flow.
37
+
38
+ **Features** — the state of feature flags in your project. Use this to branch based on which variant a visitor is assigned to.
39
+
40
+ **Location** — properties of the visitor's current page URL, including pathname, search parameters, hostname, and hash.
41
+
42
+ ## Example
43
+
44
+ To show a step only to visitors on a specific page who opted into marketing:
45
+
46
+ 1. Create an AND group.
47
+ 2. Add a rule: **Location → pathname** equals `/pricing`.
48
+ 3. Add a rule: **Responses → marketing_opt_in** equals `true`.
49
+
50
+ Both conditions must be true for the rule group to match.
51
+
52
+ ---
53
+
54
+ [Overview](/flow-builder/overview) · [Nodes](/flow-builder/nodes) · [Building Flows](/flow-builder/building-flows) · [Keyboard Shortcuts](/flow-builder/keyboard-shortcuts) · **Condition Builder**
@@ -0,0 +1,66 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Keyboard shortcuts
6
+
7
+ These shortcuts are available when the flow builder canvas is focused.
8
+
9
+ ## Canvas tools
10
+
11
+ | Shortcut (Mac) | Shortcut (PC) | Action |
12
+ | --- | --- | --- |
13
+ | `V` | `V` | Select tool |
14
+ | `H` | `H` | Hand tool (pan) |
15
+ | `Space` (hold) | `Space` (hold) | Temporary hand tool |
16
+
17
+ ## Layout
18
+
19
+ | Shortcut (Mac) | Shortcut (PC) | Action |
20
+ | --- | --- | --- |
21
+ | `Shift+L` | `Shift+L` | Auto-layout |
22
+
23
+ ## Selection
24
+
25
+ | Shortcut (Mac) | Shortcut (PC) | Action |
26
+ | --- | --- | --- |
27
+ | `Cmd+A` | `Ctrl+A` | Select all nodes |
28
+ | `Escape` | `Escape` | Deselect all |
29
+
30
+ ## Editing
31
+
32
+ | Shortcut (Mac) | Shortcut (PC) | Action |
33
+ | --- | --- | --- |
34
+ | `Cmd+D` | `Ctrl+D` | Duplicate selected nodes |
35
+ | `Delete` / `Backspace` | `Delete` / `Backspace` | Delete selected nodes |
36
+ | `Cmd+Z` | `Ctrl+Z` | Undo |
37
+ | `Cmd+Shift+Z` | `Ctrl+Shift+Z` | Redo |
38
+
39
+ ## Movement
40
+
41
+ | Shortcut (Mac) | Shortcut (PC) | Action |
42
+ | --- | --- | --- |
43
+ | Arrow keys | Arrow keys | Nudge selected nodes |
44
+ | `Shift`+Arrow keys | `Shift`+Arrow keys | Large nudge |
45
+
46
+ ## Zoom
47
+
48
+ | Shortcut (Mac) | Shortcut (PC) | Action |
49
+ | --- | --- | --- |
50
+ | Scroll | Scroll | Zoom in/out |
51
+ | Pinch | Pinch | Zoom in/out (trackpad) |
52
+ | `Cmd+=` | `Ctrl+=` | Zoom in |
53
+ | `Cmd+-` | `Ctrl+-` | Zoom out |
54
+ | `Shift+1` | `Shift+1` | Fit view |
55
+ | `Shift+0` | `Shift+0` | Zoom to 100% |
56
+
57
+ ## Panels
58
+
59
+ | Shortcut (Mac) | Shortcut (PC) | Action |
60
+ | --- | --- | --- |
61
+ | `Cmd+\` | `Ctrl+\` | Toggle both side panels |
62
+ | `?` | `?` | Toggle shortcuts |
63
+
64
+ ---
65
+
66
+ [Overview](/flow-builder/overview) · [Nodes](/flow-builder/nodes) · [Building Flows](/flow-builder/building-flows) · **Keyboard Shortcuts** · [Condition Builder](/flow-builder/condition-builder)
@@ -0,0 +1,43 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Nodes
6
+
7
+ Nodes are the building blocks of a flow. Each node represents a block in your experience. There are four node types.
8
+
9
+ ## Origin
10
+
11
+ Every flow starts with an origin node. It's a gray circle on the left side of the canvas. It has one output handle on its right side.
12
+
13
+ You can't move, delete, or duplicate the origin. It's always present.
14
+
15
+ ## Step
16
+
17
+ A step node represents a screen shown to visitors. It appears as a blue rectangle on the canvas.
18
+
19
+ Steps hold fields. Drag a field from the entity browser onto a step node to assign it. The node subtitle shows how many fields are assigned.
20
+
21
+ Each step has a `layoutName` that tells the SDK which visual layout to use when rendering this step. Configure the layout name in the inspector.
22
+
23
+ ## Action
24
+
25
+ An action node represents a side effect — something that happens behind the scenes. It appears as a green rectangle.
26
+
27
+ Actions trigger when the flow reaches them. Use actions for tasks like tracking events, sending data, or triggering integrations.
28
+
29
+ ## Condition
30
+
31
+ A condition node represents a branching point. It appears as an amber rectangle.
32
+
33
+ Condition nodes have two output handles instead of one. The green handle (top-right) connects to the path taken when the condition is true. The red handle (bottom-right) connects to the path taken when it's false.
34
+
35
+ Define the condition logic in the inspector using the visual condition builder. See [Conditions](/conditions) for details.
36
+
37
+ ## Handles
38
+
39
+ Handles are the connection points on nodes. Input handles sit on the left. Output handles sit on the right. Drag from an output handle to an input handle to connect two nodes.
40
+
41
+ ---
42
+
43
+ [Overview](/flow-builder/overview) · **Nodes** · [Building Flows](/flow-builder/building-flows) · [Keyboard Shortcuts](/flow-builder/keyboard-shortcuts) · [Condition Builder](/flow-builder/condition-builder)
@@ -0,0 +1,43 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Flow builder
6
+
7
+ The flow builder is a visual editor for designing experience flows. You drag blocks onto a canvas, connect them with arrows, and configure each node in an inspector panel.
8
+
9
+ ## Layout
10
+
11
+ The flow builder has three panels arranged left to right.
12
+
13
+ **Entity browser** (left): Lists all steps, actions, conditions, and fields in your project. Drag items from here onto the canvas.
14
+
15
+ **Canvas** (center): The workspace where you build your flow. Nodes represent blocks. Arrows represent connections between them.
16
+
17
+ **Inspector** (right): Shows configuration for the selected node. When nothing is selected, it shows experience-level settings.
18
+
19
+ ## Panel controls
20
+
21
+ Drag the dividers between panels to resize them. Press `Cmd/Ctrl+\` to toggle both side panels. Press `Cmd/Ctrl+Shift+\` to toggle just the inspector.
22
+
23
+ ## Navigating the canvas
24
+
25
+ **Zoom**: Scroll to zoom in and out.
26
+
27
+ **Pan**: Select the hand tool (press `H`) and drag. Or hold `Space` while dragging. Middle-click drag also pans.
28
+
29
+ **Select tool**: Press `V` to switch back to the select tool. This is the default — click to select nodes, drag on empty space to marquee-select.
30
+
31
+ ## Auto-layout
32
+
33
+ Click the auto-layout button in the toolbar to automatically arrange all nodes in a clean hierarchy. Useful after adding many nodes or when the canvas gets messy.
34
+
35
+ ## Saving
36
+
37
+ Click **Save** in the toolbar to save your flow. The button is enabled when you have unsaved changes.
38
+
39
+ The flow builder also auto-saves after a period of inactivity. A dot indicator appears on the save button when there are unsaved changes.
40
+
41
+ ---
42
+
43
+ **Flow Builder** · [Nodes](/flow-builder/nodes) · [Building Flows](/flow-builder/building-flows) · [Keyboard Shortcuts](/flow-builder/keyboard-shortcuts) · [Condition Builder](/flow-builder/condition-builder)
@@ -0,0 +1,79 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Getting Started
6
+
7
+ Picked lets you build personalized UI flows in a visual editor and deliver them to visitors on your site with a lightweight SDK.
8
+
9
+ ## How it works
10
+
11
+ You design experiences in the dashboard using a drag-and-drop flow builder. The SDK fetches your published experiences and renders them on your site.
12
+
13
+ ## Quick start
14
+
15
+ ### 1. Create a project
16
+
17
+ Sign in to the dashboard and create a project. A project represents one website or app.
18
+
19
+ See [Projects](/projects) for details.
20
+
21
+ ### 2. Install the SDK
22
+
23
+ Add the SDK to your site and initialize the client. Copy the snippet from your project home page.
24
+
25
+ ```typescript
26
+ import { createClient } from '@picked/client'
27
+
28
+ const picked = createClient({
29
+ organizationId: 'your-organization-id',
30
+ projectId: 'your-project-id',
31
+ plugins: [],
32
+ })
33
+
34
+ picked.start()
35
+ ```
36
+
37
+ See [SDK Installation](/sdk) for full setup options.
38
+
39
+ ### 3. Register a component
40
+
41
+ Register components when creating the client. Each key in the `components` object must match a component name you set in the dashboard.
42
+
43
+ ```typescript
44
+ import { createClient } from '@picked/client'
45
+
46
+ const picked = createClient({
47
+ organizationId: 'your-organization-id',
48
+ projectId: 'your-project-id',
49
+ components: {
50
+ 'welcome-survey': YourComponent,
51
+ },
52
+ })
53
+
54
+ picked.start()
55
+ ```
56
+
57
+ See [SDK Experiences](/sdk/experiences) for targeting, conditions, and component adapters.
58
+
59
+ ### 4. Create an experience
60
+
61
+ In the dashboard, open your project and click **Experiences** > **New Experience**. Enter a name and set the component name to match your registered component (e.g., `welcome-survey`).
62
+
63
+ See [Experiences](/experiences) for configuration options.
64
+
65
+ ### 5. Build the flow
66
+
67
+ Open the flow builder and drag steps, actions, and conditions onto the canvas. Connect nodes to define the visitor's path through the experience.
68
+
69
+ See [Flow Builder](/flow-builder/overview) for a full walkthrough.
70
+
71
+ ### 6. Save and publish
72
+
73
+ Click **Save** in the flow builder toolbar. The SDK picks up the published experience and renders it to matching visitors on your site.
74
+
75
+ ## Next steps
76
+
77
+ - [Flow Builder](/flow-builder/overview) — Build experience flows visually
78
+ - [Steps](/steps), [Fields](/fields), [Actions](/actions), [Conditions](/conditions) — Configure the building blocks of experiences
79
+ - [SDK Installation](/sdk) — Full SDK setup and configuration
@@ -0,0 +1,98 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Data sources
6
+
7
+ PickedQL provides four virtual tables, each optimized for different query patterns.
8
+
9
+ ## `metrics` — Pre-aggregated daily data
10
+
11
+ Best for dashboards and trend analysis. One row per unique combination of dimensions per day. Dimension columns (like `device_category`, `country_code`, `utm_source`) are available directly — no joins needed.
12
+
13
+ ```sql
14
+ SELECT device_category, control_users(), variant_users()
15
+ FROM metrics
16
+ WHERE project_id = 'your-project-id'
17
+ GROUP BY device_category
18
+ ```
19
+
20
+ ## `events` — User-level event data
21
+
22
+ Best for deep analysis, funnels, and custom breakdowns. One row per event per user. Dimension columns (like `device_category` or `country_code`) are joined automatically when referenced.
23
+
24
+ ```sql
25
+ SELECT user_canonical_id, device_category
26
+ FROM events
27
+ WHERE project_id = 'your-project-id'
28
+ AND variant_type = 'Control'
29
+ ```
30
+
31
+ ## `features` — Feature flag analysis
32
+
33
+ Best for querying user, session, and event counts per feature flag and bucket. Uses parameterized functions.
34
+
35
+ ```sql
36
+ SELECT feature_users('homepage_test', 'control')
37
+ FROM features
38
+ WHERE project_id = 'your-project-id'
39
+ ```
40
+
41
+ ## `experience_journey` — Sankey-ready step transitions
42
+
43
+ Returns per-edge `source, target, users` rows ready to feed a sankey or funnel chart. Wraps the 8-CTE step-transition scaffold (lagInFrame, consecutive-step dedup, top-N path ranking) that cards used to carry inline.
44
+
45
+ All filters pass through the **outer `WHERE`** — PickedQL extracts them as parameters and substitutes them into the underlying scaffold. Only `project_id` is required; the rest are optional and default sensibly.
46
+
47
+ | Param (WHERE key) | Purpose |
48
+ |---|---|
49
+ | `project_id` | Required tenant filter. |
50
+ | `experience_id` | Restrict to one `fact_events.experience_id`. |
51
+ | `starting_step` | Anchor edges at each user's first occurrence of this `step_id`. Absent → anchor at user's first step_enter event. |
52
+ | `targeting_step` | Trim each user's window at their first occurrence of this `step_id`. Users who never reach it still contribute their journey up to `num_nodes_after_start`. |
53
+ | `num_nodes_after_start` | Forward window size from the starting step (card 4129 semantics). |
54
+ | `num_nodes_before_target` | Backward window size from the targeting step (card 2740 semantics). Requires `targeting_step`. |
55
+ | `top_n_path` | Keep only the top-N distinct paths by user count. |
56
+
57
+ When `num_nodes_after_start` and `num_nodes_before_target` are both set, both predicates apply (intersection).
58
+
59
+ ```sql
60
+ -- "Overall user journey" sankey (card 4129 pattern) — forward window, target optional
61
+ SELECT source, target, users FROM experience_journey
62
+ WHERE project_id = 'your-project-id'
63
+ AND starting_step = 'step-start'
64
+ AND targeting_step = 'step-target'
65
+ AND num_nodes_after_start = 10
66
+ ```
67
+
68
+ ```sql
69
+ -- "Paths leading to target" sankey (card 2740 pattern) — backward window + top-N ranking
70
+ SELECT source, target, users FROM experience_journey
71
+ WHERE project_id = 'your-project-id'
72
+ AND experience_id = 'exp-123'
73
+ AND starting_step = 'step-start'
74
+ AND targeting_step = 'step-target'
75
+ AND num_nodes_before_target = 5
76
+ AND top_n_path = 10
77
+ ```
78
+
79
+ ```sql
80
+ -- "Drop-off" sankey (card 2744 pattern) — omit targeting_step
81
+ SELECT source, target, users FROM experience_journey
82
+ WHERE project_id = 'your-project-id'
83
+ AND experience_id = 'exp-123'
84
+ AND starting_step = 'step-start'
85
+ AND num_nodes_after_start = 10
86
+ ```
87
+
88
+ Columns returned:
89
+
90
+ | Column | Type | Description |
91
+ |---|---|---|
92
+ | `source` | String | Edge start, formatted as `NN. step_id` (e.g., `01. welcome`). |
93
+ | `target` | String | Edge end, formatted as `NN. step_id`. |
94
+ | `users` | UInt64 | Distinct `user_canonical_id` count that traversed this edge. |
95
+
96
+ :::note
97
+ `experience_journey` is aggregated output. Dimension filters (`variant_type`, `device_category`, `country_code`, …) are **not** supported — if you need those, query [`events`](#events--user-level-event-data) directly and build the transitions yourself.
98
+ :::
@@ -0,0 +1,23 @@
1
+ ---
2
+ layout: docs
3
+ ---
4
+
5
+ # Dimension columns
6
+
7
+ Dimension columns are available on all data sources. On `metrics`, they are included directly in the table. On `events` and `features`, the required `LEFT JOIN` is added automatically when you reference them — you never write joins yourself.
8
+
9
+ ## Available dimensions
10
+
11
+ | Source | Columns |
12
+ |---|---|
13
+ | `dim_variant` | `variant_type`, `ab_feature_name`, `ab_feature_value` |
14
+ | `dim_device` | `device_category`, `browser_name`, `browser_version`, `os_name`, `os_version`, `platform` |
15
+ | `dim_geo` | `country_code`, `country_name`, `region`, `city` |
16
+ | `dim_utm` | `utm_source`, `utm_medium`, `utm_campaign`, `utm_term`, `utm_content` |
17
+ | `dim_product` | `product_name`, `product_category`, `product_page` |
18
+
19
+ ## Native event columns
20
+
21
+ These columns are available directly on `events` and require no join:
22
+
23
+ `event_type`, `interaction_type`, `experience_id`, `step_id`, `event_id`, `user_canonical_id`, `session_id`, `client_local_date`, `is_purchase`, `is_cart_add`, `event_meta`.