@picked/client 0.0.70-next.6 → 0.0.71-next.1
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.
- package/dist/.tsbuildinfo +1 -0
- package/dist/api-CH2FNa6S.cjs +1 -0
- package/dist/api-CgqRvuKL.js +38 -0
- package/dist/cjs/form/index.js +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/plugins/dom-observer/index.js +1 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/docs/actions.mdx +38 -18
- package/dist/docs/api/authentication.md +75 -48
- package/dist/docs/api/authorization-and-scopes.md +63 -47
- package/dist/docs/api/error-handling.md +70 -54
- package/dist/docs/api/index.md +41 -22
- package/dist/docs/api/pagination.md +30 -20
- package/dist/docs/api-keys.mdx +11 -6
- package/dist/docs/chrome-extension.md +22 -5
- package/dist/docs/conditions.mdx +32 -19
- package/dist/docs/content/asset-library.mdx +65 -34
- package/dist/docs/content/content-entries.mdx +8 -2
- package/dist/docs/content/layouts.mdx +45 -29
- package/dist/docs/content/pages.mdx +29 -14
- package/dist/docs/content/sections.mdx +19 -8
- package/dist/docs/delivery-api/experience-content.md +10 -5
- package/dist/docs/delivery-api/index.md +19 -12
- package/dist/docs/delivery-api/preview-caching-crawling.md +27 -14
- package/dist/docs/delivery-api/project-config.md +6 -4
- package/dist/docs/experiences.mdx +26 -10
- package/dist/docs/features.mdx +66 -25
- package/dist/docs/fields.mdx +42 -27
- package/dist/docs/flow-builder/building-flows.md +38 -20
- package/dist/docs/flow-builder/condition-builder.md +32 -21
- package/dist/docs/flow-builder/keyboard-shortcuts.md +18 -18
- package/dist/docs/flow-builder/nodes.md +26 -13
- package/dist/docs/flow-builder/overview.mdx +28 -15
- package/dist/docs/gtm-template.md +35 -26
- package/dist/docs/guides/build-a-personalized-page.mdx +36 -18
- package/dist/docs/image-optimisation-service.md +33 -17
- package/dist/docs/index.md +28 -17
- package/dist/docs/mcp.md +46 -38
- package/dist/docs/pickedql/data-sources.md +65 -43
- package/dist/docs/pickedql/dimensions.md +27 -12
- package/dist/docs/pickedql/examples.md +38 -26
- package/dist/docs/pickedql/filtering.md +10 -6
- package/dist/docs/pickedql/index.md +32 -14
- package/dist/docs/pickedql/schema.md +85 -76
- package/dist/docs/pickedql/virtual-functions.md +62 -36
- package/dist/docs/projects.mdx +14 -7
- package/dist/docs/reports.mdx +5 -3
- package/dist/docs/sdk/actions.md +33 -17
- package/dist/docs/sdk/conditions.md +8 -5
- package/dist/docs/sdk/content-security-policy.md +5 -4
- package/dist/docs/sdk/experiences.md +29 -11
- package/dist/docs/sdk/feature-allocation.md +79 -47
- package/dist/docs/sdk/features.md +130 -76
- package/dist/docs/sdk/fields.md +66 -42
- package/dist/docs/sdk/index.md +22 -13
- package/dist/docs/sdk/plugins/create-experience.md +18 -15
- package/dist/docs/sdk/plugins/dynamic-experiences.md +42 -16
- package/dist/docs/sdk/predicates.md +53 -37
- package/dist/docs/sdk/ssr/index.md +25 -8
- package/dist/docs/sdk/ssr/rendering-and-hydration.md +37 -16
- package/dist/docs/sdk/ssr/serialize.md +38 -20
- package/dist/docs/sdk/ssr/slots-and-placements.md +28 -10
- package/dist/docs/sdk/steps.md +100 -55
- package/dist/docs/steps.mdx +20 -11
- package/dist/docs/team-management.md +17 -11
- package/dist/docs/vite-plugin.md +26 -19
- package/dist/docs/workspace-versioning.mdx +14 -8
- package/dist/docs/workspaces.mdx +55 -24
- package/dist/{dom-BwmTHeT7.js → dom-BqcToNL0.js} +1 -3
- package/dist/{dom-CDrHc_j9.cjs → dom-DlLH3FxV.cjs} +1 -1
- package/dist/esm/form/index.js +2 -4
- package/dist/esm/index.js +50 -45
- package/dist/esm/plugins/dom-observer/index.js +1 -1
- package/dist/esm/plugins/dynamic-experiences/index.js +2 -2
- package/dist/esm/preview/index.js +1 -1
- package/dist/esm/server/index.js +12 -10
- package/dist/{experience-instance-DOJShRk5.js → experience-instance-DGk11d8a.js} +3 -3
- package/dist/experience-instance-Dej3P1sE.cjs +1 -0
- package/dist/{plugin-BxMR7fOV.js → plugin-D2UqFikQ.js} +2 -2
- package/dist/plugin-DCW-tnjO.cjs +1 -0
- package/dist/{preview-channel-DW9J8t4B.js → preview-channel-CSr96XAo.js} +1 -1
- package/dist/{protocol-DSqOlW2r.js → protocol-C5KkkiZc.js} +1 -1
- package/dist/types/client.d.ts +7 -6
- package/dist/types/entities/action/action.d.ts +5 -4
- package/dist/types/entities/action/action.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +6 -5
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/condition/condition.d.ts +5 -5
- package/dist/types/entities/content/content.d.ts +4 -3
- package/dist/types/entities/experience/experience.d.ts +11 -10
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +10 -9
- package/dist/types/entities/feature/feature.d.ts +3 -2
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts +7 -6
- package/dist/types/entities/framework/framework.d.ts.map +1 -1
- package/dist/types/entities/history/history.d.ts +6 -6
- package/dist/types/entities/plugin/plugin.d.ts +3 -2
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +4 -3
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/response/response-validation.d.ts +3 -2
- package/dist/types/entities/response/response.d.ts +12 -11
- package/dist/types/entities/session/session.d.ts +2 -1
- package/dist/types/entities/step/step.d.ts +6 -5
- package/dist/types/exports.d.ts +2 -1
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/form/build-responses.d.ts +2 -1
- package/dist/types/form/create-field-evaluator.d.ts +4 -3
- package/dist/types/form/create-field-validation.d.ts +5 -4
- package/dist/types/form/create-form.d.ts +7 -6
- package/dist/types/form/create-submit-pipeline.d.ts +7 -6
- package/dist/types/form/get-step-fields.d.ts +3 -2
- package/dist/types/lifecycle/condition-selection.d.ts +14 -4
- package/dist/types/lifecycle/lifecycle.d.ts +4 -3
- package/dist/types/lifecycle/rules-logic.d.ts +4 -3
- package/dist/types/lifecycle/state-snapshot.d.ts +4 -3
- package/dist/types/picked.d.ts +64 -62
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/ping.d.ts +1 -1
- package/dist/types/ping.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/create-experience.d.ts +9 -8
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts +3 -2
- package/dist/types/plugins/create-experience/plugin.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/serialization.d.ts.map +1 -1
- package/dist/types/plugins/dom-observer/plugin.d.ts +1 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +3 -3
- package/dist/types/plugins/dynamic-experiences/types.d.ts +8 -5
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +1 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +1 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts +1 -1
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/plugins/web-components/plugin.d.ts +2 -1
- package/dist/types/plugins/window-object/plugin.d.ts +2 -2
- package/dist/types/preview-channel.d.ts +5 -1
- package/dist/types/preview-receiver/index.d.ts +18 -1
- package/dist/types/preview-receiver/protocol.d.ts +10 -1
- package/dist/types/server/index.d.ts +3 -3
- package/dist/types/server/serialize.d.ts +2 -2
- package/dist/types/utils/dom.d.ts +2 -1
- package/dist/types/utils/events.d.ts +6 -6
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +1 -1
- package/dist/types/utils/global-obj.d.ts.map +1 -1
- package/dist/types/utils/id.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts +2 -1
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +2 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-next-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts +1 -1
- package/dist/types/utils/node-tree/get-origin-node.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-leaf.d.ts.map +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts +1 -1
- package/dist/types/utils/node-tree/min-max-steps-to-origin.d.ts.map +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts +1 -1
- package/dist/types/utils/node-tree/next-reachable-step-nodes.d.ts.map +1 -1
- package/dist/types/utils/nodes.d.ts +1 -1
- package/dist/types/utils/picked-config.d.ts +2 -1
- package/dist/types/utils/rules-logic.d.ts +6 -2
- package/dist/types/utils/storage.d.ts +1 -1
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/package.json +22 -23
- package/dist/api-CoUkIxIr.cjs +0 -1
- package/dist/api-ahdSBQ3Y.js +0 -40
- package/dist/experience-instance-DurC3pE-.cjs +0 -1
- package/dist/plugin-CASdGtTX.cjs +0 -1
|
@@ -4,15 +4,15 @@ layout: docs
|
|
|
4
4
|
|
|
5
5
|
# Keyboard shortcuts
|
|
6
6
|
|
|
7
|
-
These shortcuts
|
|
7
|
+
These shortcuts work when the canvas of the flow builder holds the keyboard input.
|
|
8
8
|
|
|
9
9
|
## Canvas tools
|
|
10
10
|
|
|
11
11
|
| Shortcut (Mac) | Shortcut (PC) | Action |
|
|
12
12
|
| --- | --- | --- |
|
|
13
|
-
| `V` | `V` |
|
|
14
|
-
| `H` | `H` |
|
|
15
|
-
| `Space
|
|
13
|
+
| `V` | `V` | The choose tool |
|
|
14
|
+
| `H` | `H` | The hand tool, which pans the view |
|
|
15
|
+
| `Space`, held | `Space`, held | The hand tool, while you hold the key |
|
|
16
16
|
|
|
17
17
|
## Layout
|
|
18
18
|
|
|
@@ -20,19 +20,19 @@ These shortcuts are available when the flow builder canvas is focused.
|
|
|
20
20
|
| --- | --- | --- |
|
|
21
21
|
| `Shift+L` | `Shift+L` | Auto-layout |
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Choice
|
|
24
24
|
|
|
25
25
|
| Shortcut (Mac) | Shortcut (PC) | Action |
|
|
26
26
|
| --- | --- | --- |
|
|
27
|
-
| `Cmd+A` | `Ctrl+A` |
|
|
28
|
-
| `Escape` | `Escape` |
|
|
27
|
+
| `Cmd+A` | `Ctrl+A` | Choose every node |
|
|
28
|
+
| `Escape` | `Escape` | Choose no node |
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Edits
|
|
31
31
|
|
|
32
32
|
| Shortcut (Mac) | Shortcut (PC) | Action |
|
|
33
33
|
| --- | --- | --- |
|
|
34
|
-
| `Cmd+D` | `Ctrl+D` |
|
|
35
|
-
| `Delete`
|
|
34
|
+
| `Cmd+D` | `Ctrl+D` | Make a copy of each chosen node |
|
|
35
|
+
| `Delete` or `Backspace` | `Delete` or `Backspace` | Delete each chosen node |
|
|
36
36
|
| `Cmd+Z` | `Ctrl+Z` | Undo |
|
|
37
37
|
| `Cmd+Shift+Z` | `Ctrl+Shift+Z` | Redo |
|
|
38
38
|
|
|
@@ -40,27 +40,27 @@ These shortcuts are available when the flow builder canvas is focused.
|
|
|
40
40
|
|
|
41
41
|
| Shortcut (Mac) | Shortcut (PC) | Action |
|
|
42
42
|
| --- | --- | --- |
|
|
43
|
-
| Arrow keys | Arrow keys |
|
|
44
|
-
| `Shift
|
|
43
|
+
| Arrow keys | Arrow keys | Move each chosen node a small distance |
|
|
44
|
+
| `Shift` and an arrow key | `Shift` and an arrow key | Move each chosen node further |
|
|
45
45
|
|
|
46
46
|
## Zoom
|
|
47
47
|
|
|
48
48
|
| Shortcut (Mac) | Shortcut (PC) | Action |
|
|
49
49
|
| --- | --- | --- |
|
|
50
|
-
| Scroll | Scroll | Zoom in
|
|
51
|
-
| Pinch | Pinch | Zoom in
|
|
50
|
+
| Scroll | Scroll | Zoom in or out |
|
|
51
|
+
| Pinch | Pinch | Zoom in or out, on a trackpad |
|
|
52
52
|
| `Cmd+=` | `Ctrl+=` | Zoom in |
|
|
53
53
|
| `Cmd+-` | `Ctrl+-` | Zoom out |
|
|
54
|
-
| `Shift+1` | `Shift+1` | Fit view |
|
|
54
|
+
| `Shift+1` | `Shift+1` | Fit the flow to the view |
|
|
55
55
|
| `Shift+0` | `Shift+0` | Zoom to 100% |
|
|
56
56
|
|
|
57
57
|
## Panels
|
|
58
58
|
|
|
59
59
|
| Shortcut (Mac) | Shortcut (PC) | Action |
|
|
60
60
|
| --- | --- | --- |
|
|
61
|
-
| `Cmd+\` | `Ctrl+\` |
|
|
62
|
-
| `?` | `?` |
|
|
61
|
+
| `Cmd+\` | `Ctrl+\` | Turn both side panels on or off |
|
|
62
|
+
| `?` | `?` | Turn this shortcut list on or off |
|
|
63
63
|
|
|
64
64
|
---
|
|
65
65
|
|
|
66
|
-
[Overview](/flow-builder/overview) · [Nodes](/flow-builder/nodes) · [
|
|
66
|
+
[Overview](/flow-builder/overview) · [Nodes](/flow-builder/nodes) · [Build Flows](/flow-builder/building-flows) · **Keyboard Shortcuts** · [Condition Builder](/flow-builder/condition-builder)
|
|
@@ -4,40 +4,53 @@ layout: docs
|
|
|
4
4
|
|
|
5
5
|
# Nodes
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A node is one part of a flow. Each node stands for a block in your experience. There
|
|
8
|
+
are four node types.
|
|
8
9
|
|
|
9
10
|
## Origin
|
|
10
11
|
|
|
11
|
-
Every flow starts with an origin node. It
|
|
12
|
+
Every flow starts with an origin node. It is a gray circle on the left side of the
|
|
13
|
+
canvas, and it has one output handle on its right side.
|
|
12
14
|
|
|
13
|
-
You
|
|
15
|
+
You cannot move the origin, delete it, or make a copy of it. It is always there.
|
|
14
16
|
|
|
15
17
|
## Step
|
|
16
18
|
|
|
17
|
-
A step node
|
|
19
|
+
A step node stands for a screen that a visitor sees. It appears as a blue rectangle
|
|
20
|
+
on the canvas.
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
A step holds fields. Drag a field from the entity browser onto a step node to assign
|
|
23
|
+
it. The subtitle of the node gives the number of assigned fields.
|
|
20
24
|
|
|
21
|
-
Each step has a `layoutName
|
|
25
|
+
Each step has a `layoutName`. It tells the SDK which visual layout to use for this
|
|
26
|
+
step. Set the layout name in the inspector.
|
|
22
27
|
|
|
23
28
|
## Action
|
|
24
29
|
|
|
25
|
-
An action node
|
|
30
|
+
An action node stands for a side effect. A side effect happens where the visitor
|
|
31
|
+
cannot see it. The node appears as a green rectangle.
|
|
26
32
|
|
|
27
|
-
|
|
33
|
+
An action runs when the flow reaches it. Use an action to record an event, to send
|
|
34
|
+
data, or to start an integration.
|
|
28
35
|
|
|
29
36
|
## Condition
|
|
30
37
|
|
|
31
|
-
A condition node
|
|
38
|
+
A condition node stands for a point where the flow splits. It appears as an amber
|
|
39
|
+
rectangle.
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
A condition node has two output handles, and not one. The green handle at the top
|
|
42
|
+
right connects to the path for a true result. The red handle at the bottom right
|
|
43
|
+
connects to the path for a false result.
|
|
34
44
|
|
|
35
|
-
Define the
|
|
45
|
+
Define the rule in the inspector, with the visual condition builder. See
|
|
46
|
+
[Conditions](/conditions) for more detail.
|
|
36
47
|
|
|
37
48
|
## Handles
|
|
38
49
|
|
|
39
|
-
|
|
50
|
+
A handle is a connection point on a node. An input handle is on the left. An output
|
|
51
|
+
handle is on the right. Drag from an output handle to an input handle to connect two
|
|
52
|
+
nodes.
|
|
40
53
|
|
|
41
54
|
---
|
|
42
55
|
|
|
43
|
-
[Overview](/flow-builder/overview) · **Nodes** · [
|
|
56
|
+
[Overview](/flow-builder/overview) · **Nodes** · [Build Flows](/flow-builder/building-flows) · [Keyboard Shortcuts](/flow-builder/keyboard-shortcuts) · [Condition Builder](/flow-builder/condition-builder)
|
|
@@ -6,7 +6,9 @@ import { Screenshot } from '../../../components/Screenshot'
|
|
|
6
6
|
|
|
7
7
|
# Flow builder
|
|
8
8
|
|
|
9
|
-
The flow builder is a visual editor for
|
|
9
|
+
The flow builder is a visual editor for an experience flow. You drag a block onto a
|
|
10
|
+
canvas, connect the blocks with arrows, and set the options of each node in an
|
|
11
|
+
inspector panel.
|
|
10
12
|
|
|
11
13
|
<Screenshot
|
|
12
14
|
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/experiences/{experienceId}"
|
|
@@ -15,36 +17,47 @@ The flow builder is a visual editor for designing experience flows. You drag blo
|
|
|
15
17
|
|
|
16
18
|
## Layout
|
|
17
19
|
|
|
18
|
-
The flow builder has three panels
|
|
20
|
+
The flow builder has three panels, from left to right.
|
|
19
21
|
|
|
20
|
-
**Entity browser
|
|
22
|
+
**Entity browser**, on the left: it lists every step, action, condition, and field in
|
|
23
|
+
your project. Drag an item from here onto the canvas.
|
|
21
24
|
|
|
22
|
-
**Canvas
|
|
25
|
+
**Canvas**, in the middle: the area where you build your flow. A node stands for a
|
|
26
|
+
block. An arrow stands for a connection between two blocks.
|
|
23
27
|
|
|
24
|
-
**Inspector
|
|
28
|
+
**Inspector**, on the right: it shows the options of the node that you choose. When
|
|
29
|
+
you choose no node, it shows the settings of the experience.
|
|
25
30
|
|
|
26
31
|
## Panel controls
|
|
27
32
|
|
|
28
|
-
Drag
|
|
33
|
+
Drag a divider between two panels to change their size. Press `Cmd/Ctrl+\` to turn
|
|
34
|
+
both side panels on and off. Press `Cmd/Ctrl+Shift+\` to turn the inspector on and
|
|
35
|
+
off.
|
|
29
36
|
|
|
30
|
-
##
|
|
37
|
+
## Move around the canvas
|
|
31
38
|
|
|
32
|
-
**Zoom**:
|
|
39
|
+
**Zoom**: scroll to make the view larger or smaller.
|
|
33
40
|
|
|
34
|
-
**Pan**:
|
|
41
|
+
**Pan**: choose the hand tool with `H`, then drag. You can also hold `Space` and
|
|
42
|
+
drag. A drag with the middle mouse button also pans.
|
|
35
43
|
|
|
36
|
-
**
|
|
44
|
+
**Choose tool**: press `V` to go back to the default tool.
|
|
45
|
+
Click to choose a node. Drag on empty space to choose every node inside a rectangle.
|
|
37
46
|
|
|
38
47
|
## Auto-layout
|
|
39
48
|
|
|
40
|
-
Click the auto-layout button in the toolbar
|
|
49
|
+
Click the auto-layout button in the toolbar. The flow builder then arranges every
|
|
50
|
+
node into a clean hierarchy. This is useful after you add many nodes, and when the
|
|
51
|
+
canvas becomes messy.
|
|
41
52
|
|
|
42
|
-
##
|
|
53
|
+
## Save your work
|
|
43
54
|
|
|
44
|
-
Click **Save** in the toolbar to save your flow. The button is
|
|
55
|
+
Click **Save** in the toolbar to save your flow. The button is active when you have
|
|
56
|
+
an unsaved change.
|
|
45
57
|
|
|
46
|
-
The flow builder also
|
|
58
|
+
The flow builder also saves by itself after a period of inactivity. A dot on the save
|
|
59
|
+
button means that you have an unsaved change.
|
|
47
60
|
|
|
48
61
|
---
|
|
49
62
|
|
|
50
|
-
**Flow Builder** · [Nodes](/flow-builder/nodes) · [
|
|
63
|
+
**Flow Builder** · [Nodes](/flow-builder/nodes) · [Build Flows](/flow-builder/building-flows) · [Keyboard Shortcuts](/flow-builder/keyboard-shortcuts) · [Condition Builder](/flow-builder/condition-builder)
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
layout: docs
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
# Google Tag Manager
|
|
5
|
+
# Template for Google Tag Manager
|
|
6
6
|
|
|
7
|
-
The Picked Ecommerce
|
|
7
|
+
The Picked Ecommerce template for Google Tag Manager lets you track an ecommerce
|
|
8
|
+
event and send it to Picked.
|
|
8
9
|
|
|
9
10
|
## Automatic installation
|
|
10
11
|
|
|
@@ -13,57 +14,65 @@ Install the template from the GTM Community Gallery:
|
|
|
13
14
|
1. In Tag Manager, click **Templates**.
|
|
14
15
|
2. In the **Tag Templates** section, click **Search Gallery**.
|
|
15
16
|
3. Search for `Picked Ecommerce`.
|
|
16
|
-
4. Click the Picked Ecommerce template to
|
|
17
|
-
5. Click **Add to workspace
|
|
18
|
-
6.
|
|
17
|
+
4. Click the Picked Ecommerce template to read its detail.
|
|
18
|
+
5. Click the **Add to workspace** button.
|
|
19
|
+
6. Read the permissions that it needs.
|
|
20
|
+
7. Click **Add**.
|
|
19
21
|
|
|
20
|
-

|
|
22
|
+

|
|
21
23
|
|
|
22
24
|
## Manual installation
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
To import the template file yourself:
|
|
25
27
|
|
|
26
|
-
1. Download the
|
|
28
|
+
1. Download the
|
|
29
|
+
[template file](https://github.com/picked-app/gtm-template/blob/main/template.tpl)
|
|
30
|
+
from GitHub with the download icon.
|
|
27
31
|
2. In Google Tag Manager, go to **Templates**.
|
|
28
32
|
3. Click **New**.
|
|
29
|
-
4. Open the three-dot menu
|
|
30
|
-
5.
|
|
31
|
-
6.
|
|
33
|
+
4. Open the three-dot menu.
|
|
34
|
+
5. Click **Import**.
|
|
35
|
+
6. Choose the file that you downloaded.
|
|
36
|
+
7. Click **Save**.
|
|
32
37
|
|
|
33
38
|
## Setup
|
|
34
39
|
|
|
35
40
|
### 1. Create a Tag ID variable
|
|
36
41
|
|
|
37
|
-
Sign in to the [Picked Dashboard](https://dashboard.picked.app) and copy
|
|
42
|
+
Sign in to the [Picked Dashboard](https://dashboard.picked.app) and copy the Tag ID of
|
|
43
|
+
your project. Save it as a constant variable in GTM, for example `Picked Tag ID`.
|
|
38
44
|
|
|
39
|
-

|
|
40
46
|
|
|
41
47
|
### 2. Create an ecommerce data variable
|
|
42
48
|
|
|
43
|
-
Create a **Data Layer Variable** with the variable name
|
|
49
|
+
Create a **Data Layer Variable** with the variable name `ecommerce`. It captures what
|
|
50
|
+
GA4 Enhanced Ecommerce writes to the data layer.
|
|
44
51
|
|
|
45
|
-

|
|
46
53
|
|
|
47
54
|
### 3. Create event triggers
|
|
48
55
|
|
|
49
|
-
Add a trigger for each ecommerce event you want to track
|
|
56
|
+
Add a trigger for each ecommerce event that you want to track, for example
|
|
57
|
+
`add_to_cart`, `purchase`, or `view_item`.
|
|
50
58
|
|
|
51
|
-

|
|
52
60
|
|
|
53
61
|
### 4. Create tags
|
|
54
62
|
|
|
55
|
-
Create a new tag for each event
|
|
63
|
+
Create a new tag for each event. Choose the tag template called **Picked Ecommerce**. Assign
|
|
64
|
+
the trigger that matches. Then set the options below.
|
|
56
65
|
|
|
57
|
-

|
|
58
67
|
|
|
59
|
-
##
|
|
68
|
+
## Options
|
|
60
69
|
|
|
61
70
|
| Option | Description |
|
|
62
71
|
| --- | --- |
|
|
63
|
-
| **Tag ID** |
|
|
64
|
-
| **Event** | The ecommerce event to track
|
|
65
|
-
| **Send ecommerce data** |
|
|
66
|
-
| **GA4 Enhanced Ecommerce Data** | The GTM variable
|
|
67
|
-
| **Additional data** |
|
|
72
|
+
| **Tag ID** | The Tag ID of your Picked project. Find it in the [Picked Dashboard](https://dashboard.picked.app). |
|
|
73
|
+
| **Event** | The ecommerce event to track, for example `add_to_cart` or `purchase`. |
|
|
74
|
+
| **Send ecommerce data** | Turn this on to send the data from GA4 Enhanced Ecommerce to Picked. Turn it on for every ecommerce event. |
|
|
75
|
+
| **GA4 Enhanced Ecommerce Data** | The GTM variable that holds the data from GA4 Enhanced Ecommerce. Use the data layer variable from step 2. |
|
|
76
|
+
| **Additional data** | An optional GTM variable, for more metadata with the event. |
|
|
68
77
|
|
|
69
|
-

|
|
@@ -10,7 +10,10 @@ Build a personalized landing page with Picked: model it in the dashboard, publis
|
|
|
10
10
|
|
|
11
11
|
## What you will build
|
|
12
12
|
|
|
13
|
-
A standalone
|
|
13
|
+
A standalone landing page where the search rank matters. Its content lives in the
|
|
14
|
+
Picked CMS, and your server renders it. You describe the shape of the page one time,
|
|
15
|
+
fill it with content, and publish it. Your server then reads it and renders it in
|
|
16
|
+
React or in Svelte. These are the stages, from the first draft to a hydrated page:
|
|
14
17
|
|
|
15
18
|
```
|
|
16
19
|
Author (dashboard) -> Publish -> Delivery API (config + content)
|
|
@@ -21,11 +24,15 @@ Author (dashboard) -> Publish -> Delivery API (config + content)
|
|
|
21
24
|
|
|
22
25
|
A [Page Layout](/content/layouts) defines the fields your page can hold.
|
|
23
26
|
|
|
24
|
-
1. Open your workspace
|
|
25
|
-
2. Click **
|
|
26
|
-
3.
|
|
27
|
-
4.
|
|
28
|
-
5.
|
|
27
|
+
1. Open your workspace.
|
|
28
|
+
2. Click **Models** in the sidebar.
|
|
29
|
+
3. Click **New Model**.
|
|
30
|
+
4. Choose **Page Layout**.
|
|
31
|
+
5. Enter a name and a **Key**, for example `page-hero`. The Key is a unique, stable
|
|
32
|
+
identifier. Your SDK code and your API calls both use it.
|
|
33
|
+
6. Add three fields: a **Single-line text** field `title`, a **Markdown** field
|
|
34
|
+
`body`, and an **Asset** field `image`.
|
|
35
|
+
7. Save the layout.
|
|
29
36
|
|
|
30
37
|
<Screenshot
|
|
31
38
|
route="/{orgSlug}/{projectId}/workspaces/{workspaceId}/models"
|
|
@@ -36,23 +43,29 @@ See [Page & Step Layouts](/content/layouts) for every field type.
|
|
|
36
43
|
|
|
37
44
|
## Create and fill the page
|
|
38
45
|
|
|
39
|
-
1. Click **Experiences** in the sidebar
|
|
40
|
-
2.
|
|
41
|
-
3.
|
|
42
|
-
4.
|
|
43
|
-
5.
|
|
46
|
+
1. Click **Experiences** in the sidebar.
|
|
47
|
+
2. Click **New Experience**.
|
|
48
|
+
3. Choose the **Page** type.
|
|
49
|
+
4. Choose your `page-hero` layout.
|
|
50
|
+
5. On the **Properties** tab, fill in `title`, `body`, and `image`. On the first save,
|
|
51
|
+
Picked creates a [Content Entry](/content/content-entries) and links it to the
|
|
52
|
+
page.
|
|
53
|
+
6. Correct every field error.
|
|
54
|
+
7. Publish the workspace to make the page live.
|
|
44
55
|
|
|
45
56
|
See [Pages](/content/pages) for the full editor reference.
|
|
46
57
|
|
|
47
58
|
## Fetch the config and content
|
|
48
59
|
|
|
49
|
-
Your server
|
|
60
|
+
Your server reads two things from the [Delivery API](/delivery-api). The first is the
|
|
61
|
+
options of the project, which give the experiences and the steps. The second is the
|
|
62
|
+
content of the experience that matches.
|
|
50
63
|
|
|
51
64
|
```bash
|
|
52
|
-
# 1.
|
|
65
|
+
# 1. The project options: find the steps and their content links.
|
|
53
66
|
curl https://api.picked.app/api/v1/projects/proj_123
|
|
54
67
|
|
|
55
|
-
# 2.
|
|
68
|
+
# 2. The experience content: the entry data of the page.
|
|
56
69
|
curl https://api.picked.app/api/v1/projects/proj_123/experiences/exp_123/content
|
|
57
70
|
```
|
|
58
71
|
|
|
@@ -63,7 +76,7 @@ In practice you fetch the config, then let `serialize()` fetch the content for y
|
|
|
63
76
|
On the server, create a per-request client, call `serialize()` to produce a snapshot, render your app, and embed the snapshot. On the client, seed from the snapshot and hydrate.
|
|
64
77
|
|
|
65
78
|
```ts
|
|
66
|
-
// server.ts
|
|
79
|
+
// `server.ts`
|
|
67
80
|
import { createClient } from '@picked/client'
|
|
68
81
|
import { serialize } from '@picked/client/server'
|
|
69
82
|
|
|
@@ -137,7 +150,12 @@ The provider seeds synchronously, so the server HTML and the client's first pain
|
|
|
137
150
|
|
|
138
151
|
Confirm the page is crawlable end to end:
|
|
139
152
|
|
|
140
|
-
1.
|
|
141
|
-
|
|
153
|
+
1. Read the response from your server. Use `curl`, or the view-source command of
|
|
154
|
+
your browser.
|
|
155
|
+
2. Check that the HTML holds your `title` and your `body`, and that it is not an
|
|
156
|
+
empty shell.
|
|
157
|
+
3. Check that the content endpoint answers an anonymous request.
|
|
158
|
+
4. Check that it returns your entry data.
|
|
142
159
|
|
|
143
|
-
|
|
160
|
+
A crawler can read a published Delivery API response. A preview URL is disallowed.
|
|
161
|
+
See [Preview, cache, and crawlers](/delivery-api/preview-caching-crawling).
|
|
@@ -4,7 +4,10 @@ layout: docs
|
|
|
4
4
|
|
|
5
5
|
# Image optimisation service
|
|
6
6
|
|
|
7
|
-
The Picked image optimisation
|
|
7
|
+
The Picked service for image optimisation is a hosted endpoint at
|
|
8
|
+
`https://img.picked-content.com`. It reads an image from an allowed source domain and
|
|
9
|
+
resizes it. It then encodes the image again to a modern format, WebP or AVIF, and
|
|
10
|
+
caches the result.
|
|
8
11
|
|
|
9
12
|
## Endpoint
|
|
10
13
|
|
|
@@ -14,35 +17,39 @@ GET https://img.picked-content.com/_next/image?url={source}&w={width}&q={quality
|
|
|
14
17
|
|
|
15
18
|
| Parameter | Description |
|
|
16
19
|
|-----------|-------------|
|
|
17
|
-
| `url` |
|
|
18
|
-
| `w` |
|
|
19
|
-
| `q` |
|
|
20
|
+
| `url` | The URL of the source image, URL-encoded. It must point at an allowed source domain. See below. |
|
|
21
|
+
| `w` | The width in pixels. It must be one of the supported widths. |
|
|
22
|
+
| `q` | The quality: `25`, `50`, `75`, or `100`. |
|
|
20
23
|
|
|
21
|
-
The service
|
|
24
|
+
The service chooses the response format. When the browser advertises `image/avif` or
|
|
25
|
+
`image/webp` in its `Accept` header, the response uses that format. If it does not,
|
|
26
|
+
the response uses the source format.
|
|
22
27
|
|
|
23
28
|
## Allowed source domains
|
|
24
29
|
|
|
25
|
-
The service only
|
|
30
|
+
The service reads only from these hostnames:
|
|
26
31
|
|
|
27
32
|
- `**.picked.app`
|
|
28
33
|
|
|
29
|
-
A request
|
|
34
|
+
A request with a `url` parameter for any other hostname returns `400 Bad Request`.
|
|
30
35
|
|
|
31
36
|
## Supported widths
|
|
32
37
|
|
|
33
|
-
Device sizes, for responsive
|
|
38
|
+
Device sizes, for a responsive image that spans the width of the viewport:
|
|
34
39
|
|
|
35
40
|
```
|
|
36
41
|
640, 750, 828, 1080, 1200, 1920, 2048, 3840
|
|
37
42
|
```
|
|
38
43
|
|
|
39
|
-
Image sizes, for
|
|
44
|
+
Image sizes, for a UI element of fixed size such as an icon, an avatar, or a
|
|
45
|
+
thumbnail:
|
|
40
46
|
|
|
41
47
|
```
|
|
42
48
|
16, 32, 48, 64, 96, 128, 256, 384
|
|
43
49
|
```
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
A request with any other width returns `400 Bad Request`. Choose the smallest width
|
|
52
|
+
that covers the size you render at the device pixel ratio of the visitor.
|
|
46
53
|
|
|
47
54
|
## Supported qualities
|
|
48
55
|
|
|
@@ -50,11 +57,13 @@ Requests with any other width return `400 Bad Request`. Pick the smallest width
|
|
|
50
57
|
25, 50, 75, 100
|
|
51
58
|
```
|
|
52
59
|
|
|
53
|
-
|
|
60
|
+
A lower value reduces the bandwidth by a large amount. `75` is a good default for
|
|
61
|
+
most images. Use `25` or `50` for a thumbnail on a slow network.
|
|
54
62
|
|
|
55
63
|
## Responsive images
|
|
56
64
|
|
|
57
|
-
|
|
65
|
+
Use the endpoint together with the standard `srcset` attribute. The browser then
|
|
66
|
+
picks the correct width for each viewport:
|
|
58
67
|
|
|
59
68
|
```html
|
|
60
69
|
<img
|
|
@@ -69,12 +78,19 @@ Combine the endpoint with the standard `srcset` attribute to let browsers pick t
|
|
|
69
78
|
/>
|
|
70
79
|
```
|
|
71
80
|
|
|
72
|
-
##
|
|
81
|
+
## Cache
|
|
73
82
|
|
|
74
|
-
|
|
83
|
+
The upstream CDN caches each optimised response. The smallest cache TTL is 60
|
|
84
|
+
seconds. The real lifetime depends on the eviction policy of the CDN. When you change
|
|
85
|
+
the source image at the same URL, the optimised copy stays in the cache for at least
|
|
86
|
+
that time.
|
|
75
87
|
|
|
76
88
|
## Security
|
|
77
89
|
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
- The service does not optimise an SVG source. A request for an SVG returns the
|
|
91
|
+
original bytes when the source is allowed. The service never runs an embedded
|
|
92
|
+
script.
|
|
93
|
+
- Each optimised response carries a strict `Content-Security-Policy`
|
|
94
|
+
(`default-src *; script-src 'none'; sandbox;`). A compromised source therefore
|
|
95
|
+
cannot run a script in the browser that shows the image.
|
|
96
|
+
- The response uses `Content-Disposition: inline`, and never `attachment`.
|
package/dist/docs/index.md
CHANGED
|
@@ -2,25 +2,29 @@
|
|
|
2
2
|
layout: docs
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Start here
|
|
6
6
|
|
|
7
|
-
Picked lets you build personalized UI flows in a visual editor
|
|
7
|
+
Picked lets you build personalized UI flows in a visual editor. The SDK then serves
|
|
8
|
+
them to the visitors on your site.
|
|
8
9
|
|
|
9
10
|
## How it works
|
|
10
11
|
|
|
11
|
-
You
|
|
12
|
+
You build experiences in the dashboard with a drag-and-drop flow builder. The SDK
|
|
13
|
+
reads your published experiences and renders them on your site.
|
|
12
14
|
|
|
13
15
|
## Quick start
|
|
14
16
|
|
|
15
17
|
### 1. Create a project
|
|
16
18
|
|
|
17
|
-
Sign in to the dashboard and create a project. A project
|
|
19
|
+
Sign in to the dashboard and create a project. A project is one site or one
|
|
20
|
+
application.
|
|
18
21
|
|
|
19
|
-
See [Projects](/projects) for
|
|
22
|
+
See [Projects](/projects) for more detail.
|
|
20
23
|
|
|
21
24
|
### 2. Install the SDK
|
|
22
25
|
|
|
23
|
-
Add the SDK to your site and
|
|
26
|
+
Add the SDK to your site and start the client. Copy the snippet from your project
|
|
27
|
+
home page.
|
|
24
28
|
|
|
25
29
|
```typescript
|
|
26
30
|
import { createClient } from '@picked/client'
|
|
@@ -33,11 +37,12 @@ const picked = createClient({
|
|
|
33
37
|
picked.start()
|
|
34
38
|
```
|
|
35
39
|
|
|
36
|
-
See [SDK Installation](/sdk) for
|
|
40
|
+
See [SDK Installation](/sdk) for all setup options.
|
|
37
41
|
|
|
38
42
|
### 3. Register a component
|
|
39
43
|
|
|
40
|
-
Register components when
|
|
44
|
+
Register your components when you create the client. Each key in the `components`
|
|
45
|
+
object must match a component name that you set in the dashboard.
|
|
41
46
|
|
|
42
47
|
```typescript
|
|
43
48
|
import { createClient } from '@picked/client'
|
|
@@ -52,26 +57,32 @@ const picked = createClient({
|
|
|
52
57
|
picked.start()
|
|
53
58
|
```
|
|
54
59
|
|
|
55
|
-
See [SDK Experiences](/sdk/experiences) for
|
|
60
|
+
See [SDK Experiences](/sdk/experiences) for conditions, adapters, and the rules that
|
|
61
|
+
put an experience in a slot.
|
|
56
62
|
|
|
57
63
|
### 4. Create an experience
|
|
58
64
|
|
|
59
|
-
In the dashboard, open your project
|
|
65
|
+
In the dashboard, open your project. Click **Experiences**, then **New Experience**.
|
|
66
|
+
Enter a name. Set the component name to match your registered component, for example
|
|
67
|
+
`welcome-survey`.
|
|
60
68
|
|
|
61
|
-
See [Experiences](/experiences) for
|
|
69
|
+
See [Experiences](/experiences) for the options.
|
|
62
70
|
|
|
63
71
|
### 5. Build the flow
|
|
64
72
|
|
|
65
|
-
Open the flow builder
|
|
73
|
+
Open the flow builder. Drag steps, actions, and conditions onto the canvas. Connect
|
|
74
|
+
the nodes to define the path that a visitor takes through the experience.
|
|
66
75
|
|
|
67
|
-
See [Flow Builder](/flow-builder/overview) for a full
|
|
76
|
+
See [Flow Builder](/flow-builder/overview) for a full guide.
|
|
68
77
|
|
|
69
78
|
### 6. Save and publish
|
|
70
79
|
|
|
71
|
-
Click **Save** in the flow builder toolbar. The SDK
|
|
80
|
+
Click **Save** in the flow builder toolbar. The SDK reads the published experience
|
|
81
|
+
and renders it to each visitor who matches.
|
|
72
82
|
|
|
73
83
|
## Next steps
|
|
74
84
|
|
|
75
|
-
- [Flow Builder](/flow-builder/overview) — Build experience flows
|
|
76
|
-
- [Steps](/steps), [Fields](/fields), [Actions](/actions), [Conditions](/conditions)
|
|
77
|
-
|
|
85
|
+
- [Flow Builder](/flow-builder/overview) — Build experience flows in a visual editor
|
|
86
|
+
- [Steps](/steps), [Fields](/fields), [Actions](/actions), [Conditions](/conditions)
|
|
87
|
+
— Set up the parts of an experience
|
|
88
|
+
- [SDK Installation](/sdk) — Full SDK setup and options
|