@picked/client 0.0.1-dev.1788925875333 → 0.0.1-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/README.md +8 -0
- package/dist/cjs/index.js +1 -4
- package/dist/cjs/plugins/create-experience/index.js +1 -1
- package/dist/cjs/plugins/experience-browserstorage-plugin/index.js +1 -0
- package/dist/cjs/plugins/history-browserstorage-plugin/index.js +1 -0
- package/dist/cjs/plugins/responses-browserstorage-plugin/index.js +1 -0
- package/dist/cjs/plugins/responses-indexeddb-plugin/index.js +1 -0
- package/dist/cjs/plugins/shopify/index.js +1 -0
- package/dist/cjs/plugins/single-page-app/index.js +1 -1
- package/dist/cjs/plugins/window-object/index.js +1 -1
- package/dist/cjs/server/index.js +1 -1
- package/dist/esm/index.js +733 -1814
- package/dist/esm/plugins/create-experience/index.js +398 -490
- package/dist/esm/plugins/experience-browserstorage-plugin/index.js +38 -0
- package/dist/esm/plugins/history-browserstorage-plugin/index.js +26 -0
- package/dist/esm/plugins/responses-browserstorage-plugin/index.js +36 -0
- package/dist/esm/plugins/responses-indexeddb-plugin/index.js +101 -0
- package/dist/esm/plugins/shopify/index.js +59 -0
- package/dist/esm/plugins/single-page-app/index.js +35 -31
- package/dist/esm/plugins/window-object/index.js +9 -9
- package/dist/esm/server/index.js +89 -141
- package/dist/experience-instance-6ZKZS7dF.cjs +1 -0
- package/dist/experience-instance-BA0EXYg5.js +712 -0
- package/dist/id-BKIWbSTy.cjs +1 -0
- package/dist/id-BW-g3y32.js +6 -0
- package/dist/logger-BsmHUUw1.cjs +1 -0
- package/dist/logger-C9a75KZn.js +5 -0
- package/dist/object-BbFTsGh3.cjs +1 -0
- package/dist/object-JwZ58NOH.js +28 -0
- package/dist/storage-BPJwmlva.cjs +1 -0
- package/dist/storage-D87xFySf.js +85 -0
- package/dist/supports-BvrzQAVk.js +79 -0
- package/dist/supports-C0y3-V5V.cjs +1 -0
- package/dist/types/client.d.ts +23 -119
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/entities/component/component.d.ts +6 -45
- package/dist/types/entities/component/component.d.ts.map +1 -1
- package/dist/types/entities/experience/experience.d.ts +99 -152
- package/dist/types/entities/experience/experience.d.ts.map +1 -1
- package/dist/types/entities/experience-instance/experience-instance.d.ts +113 -83
- package/dist/types/entities/experience-instance/experience-instance.d.ts.map +1 -1
- package/dist/types/entities/feature/feature.d.ts +8 -118
- package/dist/types/entities/feature/feature.d.ts.map +1 -1
- package/dist/types/entities/field/field.d.ts +64 -96
- package/dist/types/entities/field/field.d.ts.map +1 -1
- package/dist/types/entities/framework/framework.d.ts +7 -32
- 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/history/history.d.ts.map +1 -1
- package/dist/types/entities/plugin/plugin.d.ts +2 -41
- package/dist/types/entities/plugin/plugin.d.ts.map +1 -1
- package/dist/types/entities/predicate/predicate.d.ts +7 -30
- package/dist/types/entities/predicate/predicate.d.ts.map +1 -1
- package/dist/types/entities/project/project.d.ts +9 -0
- package/dist/types/entities/project/project.d.ts.map +1 -0
- package/dist/types/entities/response/response.d.ts +21 -57
- package/dist/types/entities/response/response.d.ts.map +1 -1
- package/dist/types/exports.d.ts +4 -22
- package/dist/types/exports.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -12
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/logic-engine.d.ts +11 -13
- package/dist/types/logic-engine.d.ts.map +1 -1
- package/dist/types/picked.d.ts +184 -381
- package/dist/types/picked.d.ts.map +1 -1
- package/dist/types/ping.d.ts +10 -0
- package/dist/types/ping.d.ts.map +1 -0
- package/dist/types/plugins/create-experience/create-experience.d.ts +44 -119
- package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/index.d.ts +2 -2
- package/dist/types/plugins/create-experience/index.d.ts.map +1 -1
- package/dist/types/plugins/create-experience/plugin.d.ts +2 -3
- 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/experience-browserstorage-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts +6 -0
- package/dist/types/plugins/experience-browserstorage-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/history-browserstorage-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/plugin.d.ts +1 -2
- package/dist/types/plugins/history-browserstorage-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/responses-browserstorage-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts +6 -0
- package/dist/types/plugins/responses-browserstorage-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/responses-indexeddb-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts +3 -0
- package/dist/types/plugins/responses-indexeddb-plugin/plugin.d.ts.map +1 -0
- package/dist/types/plugins/shopify/index.d.ts +2 -0
- package/dist/types/plugins/shopify/index.d.ts.map +1 -0
- package/dist/types/plugins/shopify/plugin.d.ts +3 -0
- package/dist/types/plugins/shopify/plugin.d.ts.map +1 -0
- package/dist/types/plugins/shopify/shopify.d.ts +28 -0
- package/dist/types/plugins/shopify/shopify.d.ts.map +1 -0
- package/dist/types/plugins/single-page-app/plugin.d.ts +2 -2
- package/dist/types/plugins/single-page-app/plugin.d.ts.map +1 -1
- package/dist/types/plugins/window-object/plugin.d.ts +2 -2
- package/dist/types/server/index.d.ts +3 -18
- package/dist/types/server/index.d.ts.map +1 -1
- package/dist/types/utils/dom.d.ts +6 -4
- package/dist/types/utils/dom.d.ts.map +1 -1
- package/dist/types/utils/events.d.ts +38 -83
- package/dist/types/utils/events.d.ts.map +1 -1
- package/dist/types/utils/global-obj.d.ts +2 -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/indexed-db.d.ts +1 -2
- package/dist/types/utils/indexed-db.d.ts.map +1 -1
- package/dist/types/utils/logger.d.ts +1 -2
- package/dist/types/utils/logger.d.ts.map +1 -1
- package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts +3 -0
- package/dist/types/utils/node-tree/get-next-node-from-conditional.d.ts.map +1 -0
- 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 +2 -3
- package/dist/types/utils/nodes.d.ts.map +1 -1
- package/dist/types/utils/object.d.ts +8 -0
- package/dist/types/utils/object.d.ts.map +1 -1
- package/dist/types/utils/rules-logic.d.ts +3 -33
- package/dist/types/utils/rules-logic.d.ts.map +1 -1
- package/dist/types/utils/search-params.d.ts.map +1 -1
- package/dist/types/utils/state-snaphot.d.ts +16 -0
- package/dist/types/utils/state-snaphot.d.ts.map +1 -0
- package/dist/types/utils/storage.d.ts +11 -374
- package/dist/types/utils/storage.d.ts.map +1 -1
- package/dist/types/utils/supports.d.ts +0 -87
- package/dist/types/utils/supports.d.ts.map +1 -1
- package/package.json +49 -182
- package/dist/.tsbuildinfo +0 -1
- package/dist/api-DbMJli3H.js +0 -22
- package/dist/api-qiqq8lgz.cjs +0 -1
- package/dist/cjs/form/index.js +0 -1
- package/dist/cjs/plugins/dom-observer/index.js +0 -1
- package/dist/cjs/plugins/dynamic-experiences/index.js +0 -1
- package/dist/cjs/plugins/experience-browser-storage/index.js +0 -1
- package/dist/cjs/plugins/history-browser-storage/index.js +0 -1
- package/dist/cjs/plugins/responses-browser-storage/index.js +0 -1
- package/dist/cjs/plugins/responses-indexeddb/index.js +0 -1
- package/dist/cjs/plugins/telemetry/index.js +0 -1
- package/dist/cjs/plugins/web-components/index.js +0 -1
- package/dist/cjs/preview/index.js +0 -1
- package/dist/docs/_root.css +0 -101
- package/dist/docs/explanation/conditions-and-the-logic-engine.md +0 -94
- package/dist/docs/explanation/content-references.md +0 -99
- package/dist/docs/explanation/feature-flag-allocation.md +0 -218
- package/dist/docs/explanation/how-picked-works.md +0 -124
- package/dist/docs/explanation/how-pickedql-works.md +0 -76
- package/dist/docs/explanation/pages-and-flows.md +0 -64
- package/dist/docs/explanation/the-content-model.md +0 -87
- package/dist/docs/explanation/the-two-apis.md +0 -68
- package/dist/docs/explanation/why-server-side-rendering.md +0 -76
- package/dist/docs/explanation/workspaces-and-versions.md +0 -71
- package/dist/docs/how-to/add-a-step-field-or-action.md +0 -43
- package/dist/docs/how-to/analytics/index.md +0 -316
- package/dist/docs/how-to/archive-or-delete-a-workspace.md +0 -46
- package/dist/docs/how-to/authenticate-the-cli.md +0 -97
- package/dist/docs/how-to/authenticate-with-a-magic-link.md +0 -40
- package/dist/docs/how-to/authenticate-with-a-password.md +0 -51
- package/dist/docs/how-to/authenticate-with-an-api-key.md +0 -51
- package/dist/docs/how-to/authenticate-with-oauth.md +0 -40
- package/dist/docs/how-to/build-a-flow.md +0 -83
- package/dist/docs/how-to/connect-the-mcp-server.md +0 -38
- package/dist/docs/how-to/create-a-content-entry.md +0 -48
- package/dist/docs/how-to/create-a-project.md +0 -29
- package/dist/docs/how-to/create-an-experience.md +0 -42
- package/dist/docs/how-to/create-and-revoke-an-api-key.md +0 -42
- package/dist/docs/how-to/debug-with-the-chrome-extension.md +0 -57
- package/dist/docs/how-to/define-a-page-layout.md +0 -46
- package/dist/docs/how-to/fill-and-publish-a-page.md +0 -66
- package/dist/docs/how-to/install-the-gtm-template.md +0 -84
- package/dist/docs/how-to/install-the-sdk.md +0 -93
- package/dist/docs/how-to/install-the-vite-plugin.md +0 -69
- package/dist/docs/how-to/invite-and-remove-members.md +0 -34
- package/dist/docs/how-to/point-one-entry-at-another.md +0 -61
- package/dist/docs/how-to/preview-a-workspace.md +0 -28
- package/dist/docs/how-to/publish-a-workspace.md +0 -30
- package/dist/docs/how-to/read-a-feature-flag.md +0 -113
- package/dist/docs/how-to/read-a-referenced-entry.md +0 -109
- package/dist/docs/how-to/register-a-component.md +0 -55
- package/dist/docs/how-to/register-an-action-handler.md +0 -67
- package/dist/docs/how-to/render-a-step-form.md +0 -131
- package/dist/docs/how-to/render-an-unpublished-preview.md +0 -41
- package/dist/docs/how-to/reuse-a-section.md +0 -53
- package/dist/docs/how-to/reuse-a-step-field-or-action.md +0 -28
- package/dist/docs/how-to/roll-back-a-published-version.md +0 -26
- package/dist/docs/how-to/run-an-ab-test.md +0 -49
- package/dist/docs/how-to/run-code-on-a-form-submission.md +0 -125
- package/dist/docs/how-to/server-render-a-page.md +0 -81
- package/dist/docs/how-to/set-a-content-security-policy.md +0 -32
- package/dist/docs/how-to/set-up-mfa.md +0 -69
- package/dist/docs/how-to/switch-workspaces.md +0 -122
- package/dist/docs/how-to/upload-and-use-an-asset.mdx +0 -73
- package/dist/docs/how-to/validate-a-field.md +0 -52
- package/dist/docs/how-to/write-a-condition.md +0 -45
- package/dist/docs/how-to/write-a-predicate.md +0 -60
- package/dist/docs/index.md +0 -59
- package/dist/docs/reference/dashboard/actions.mdx +0 -53
- package/dist/docs/reference/dashboard/api-keys.mdx +0 -38
- package/dist/docs/reference/dashboard/conditions.mdx +0 -42
- package/dist/docs/reference/dashboard/content/asset-library.mdx +0 -63
- package/dist/docs/reference/dashboard/content/blocks.mdx +0 -57
- package/dist/docs/reference/dashboard/content/content-entries.mdx +0 -95
- package/dist/docs/reference/dashboard/content/models.mdx +0 -108
- package/dist/docs/reference/dashboard/content/pages.mdx +0 -61
- package/dist/docs/reference/dashboard/experiences.mdx +0 -51
- package/dist/docs/reference/dashboard/features.mdx +0 -154
- package/dist/docs/reference/dashboard/fields.mdx +0 -106
- package/dist/docs/reference/dashboard/flow-builder/canvas.mdx +0 -58
- package/dist/docs/reference/dashboard/flow-builder/condition-builder.md +0 -57
- package/dist/docs/reference/dashboard/flow-builder/keyboard-shortcuts.md +0 -72
- package/dist/docs/reference/dashboard/flow-builder/nodes.md +0 -63
- package/dist/docs/reference/dashboard/projects.mdx +0 -44
- package/dist/docs/reference/dashboard/reports.mdx +0 -43
- package/dist/docs/reference/dashboard/steps.mdx +0 -37
- package/dist/docs/reference/dashboard/team-management.md +0 -29
- package/dist/docs/reference/dashboard/workspace-versioning.mdx +0 -30
- package/dist/docs/reference/dashboard/workspaces.mdx +0 -76
- package/dist/docs/reference/delivery-api/experience-content.md +0 -152
- package/dist/docs/reference/delivery-api/index.md +0 -45
- package/dist/docs/reference/delivery-api/preview-caching-crawling.md +0 -79
- package/dist/docs/reference/delivery-api/project-config.md +0 -65
- package/dist/docs/reference/delivery-api/workspace-schema.md +0 -85
- package/dist/docs/reference/glossary.md +0 -181
- package/dist/docs/reference/management-api/authentication.md +0 -74
- package/dist/docs/reference/management-api/authorization-and-scopes.md +0 -285
- package/dist/docs/reference/management-api/error-handling.md +0 -233
- package/dist/docs/reference/management-api/pagination.md +0 -192
- package/dist/docs/reference/pickedql/data-sources.md +0 -174
- package/dist/docs/reference/pickedql/dimensions.md +0 -103
- package/dist/docs/reference/pickedql/filtering.md +0 -64
- package/dist/docs/reference/pickedql/index.md +0 -18
- package/dist/docs/reference/pickedql/schema.md +0 -172
- package/dist/docs/reference/pickedql/virtual-functions.md +0 -248
- package/dist/docs/reference/sdk/actions.md +0 -30
- package/dist/docs/reference/sdk/analytics-events.md +0 -445
- package/dist/docs/reference/sdk/conditions.md +0 -147
- package/dist/docs/reference/sdk/content-security-policy.md +0 -21
- package/dist/docs/reference/sdk/content.md +0 -213
- package/dist/docs/reference/sdk/experiences.md +0 -51
- package/dist/docs/reference/sdk/features.md +0 -256
- package/dist/docs/reference/sdk/fields.md +0 -255
- package/dist/docs/reference/sdk/index.md +0 -68
- package/dist/docs/reference/sdk/plugins/create-experience.md +0 -123
- package/dist/docs/reference/sdk/plugins/dynamic-experiences.md +0 -74
- package/dist/docs/reference/sdk/plugins/index.md +0 -29
- package/dist/docs/reference/sdk/plugins/window-object.md +0 -25
- package/dist/docs/reference/sdk/predicates.md +0 -43
- package/dist/docs/reference/sdk/ssr/index.md +0 -33
- package/dist/docs/reference/sdk/ssr/rendering-and-hydration.md +0 -103
- package/dist/docs/reference/sdk/ssr/serialize.md +0 -80
- package/dist/docs/reference/sdk/ssr/slots-and-placements.md +0 -59
- package/dist/docs/reference/sdk/steps.md +0 -86
- package/dist/docs/reference/sdk/type-generation.md +0 -196
- package/dist/docs/reference/tools/chrome-extension.md +0 -16
- package/dist/docs/reference/tools/cli.md +0 -146
- package/dist/docs/reference/tools/image-optimisation-service.md +0 -104
- package/dist/docs/reference/tools/mcp.md +0 -90
- package/dist/docs/reference/tools/vite-plugin.md +0 -163
- package/dist/docs/tutorials/first-api-call.md +0 -228
- package/dist/docs/tutorials/first-experience-in-the-dashboard.mdx +0 -143
- package/dist/docs/tutorials/first-experience.mdx +0 -254
- package/dist/docs/tutorials/first-server-rendered-page.mdx +0 -186
- package/dist/dom-BqcToNL0.js +0 -82
- package/dist/dom-DlLH3FxV.cjs +0 -1
- package/dist/emit-D-tLiWL1.cjs +0 -1
- package/dist/emit-Ds2EG7CB.js +0 -14
- package/dist/esm/form/index.js +0 -565
- package/dist/esm/plugins/dom-observer/index.js +0 -87
- package/dist/esm/plugins/dynamic-experiences/index.js +0 -5
- package/dist/esm/plugins/experience-browser-storage/index.js +0 -38
- package/dist/esm/plugins/history-browser-storage/index.js +0 -26
- package/dist/esm/plugins/responses-browser-storage/index.js +0 -71
- package/dist/esm/plugins/responses-indexeddb/index.js +0 -89
- package/dist/esm/plugins/telemetry/index.js +0 -100
- package/dist/esm/plugins/web-components/index.js +0 -19
- package/dist/esm/preview/index.js +0 -2
- package/dist/experience-instance-DGk11d8a.js +0 -563
- package/dist/experience-instance-Dej3P1sE.cjs +0 -1
- package/dist/id-Bo4RBeOs.js +0 -4
- package/dist/id-Js-62re-.cjs +0 -1
- package/dist/inert-script-report-B_bMPRzp.js +0 -18
- package/dist/inert-script-report-ijRHPtcY.cjs +0 -1
- package/dist/logger-CSTvAyyB.cjs +0 -1
- package/dist/logger-DMN6TxJJ.js +0 -4
- package/dist/object-BUDGxEqy.js +0 -25
- package/dist/object-CIkt7Fkr.cjs +0 -1
- package/dist/plugin-BcLaCLm1.cjs +0 -1
- package/dist/plugin-De_BJSwE.js +0 -194
- package/dist/preview-channel-CSr96XAo.js +0 -98
- package/dist/preview-channel-Cx0e6fye.cjs +0 -1
- package/dist/protocol-Bb_vpLKE.cjs +0 -1
- package/dist/protocol-C5KkkiZc.js +0 -84
- package/dist/provider-C_9u0yGJ.cjs +0 -1
- package/dist/provider-ovM-CBX_.js +0 -98
- package/dist/registry-C1t8l3t9.cjs +0 -1
- package/dist/registry-CXZv0uLg.js +0 -18
- package/dist/rules-logic-CGZIYgAI.cjs +0 -1
- package/dist/rules-logic-HesIUCu6.js +0 -13
- package/dist/storage-1MW3-_As.js +0 -103
- package/dist/storage-DUw9UJ2h.cjs +0 -1
- package/dist/supports-CO9bJGNl.js +0 -92
- package/dist/supports-DBzjGaWD.cjs +0 -1
- package/dist/types/data-source/api.d.ts +0 -60
- package/dist/types/data-source/api.d.ts.map +0 -1
- package/dist/types/data-source/provider.d.ts +0 -103
- package/dist/types/data-source/provider.d.ts.map +0 -1
- package/dist/types/data-source/registry.d.ts +0 -26
- package/dist/types/data-source/registry.d.ts.map +0 -1
- package/dist/types/data-source/request-observer.d.ts +0 -62
- package/dist/types/data-source/request-observer.d.ts.map +0 -1
- package/dist/types/data-source/virtual-data.d.ts +0 -19
- package/dist/types/data-source/virtual-data.d.ts.map +0 -1
- package/dist/types/entities/action/action.d.ts +0 -85
- package/dist/types/entities/action/action.d.ts.map +0 -1
- package/dist/types/entities/component/lazyComponent.d.ts +0 -11
- package/dist/types/entities/component/lazyComponent.d.ts.map +0 -1
- package/dist/types/entities/condition/condition.d.ts +0 -29
- package/dist/types/entities/condition/condition.d.ts.map +0 -1
- package/dist/types/entities/content/content.d.ts +0 -53
- package/dist/types/entities/content/content.d.ts.map +0 -1
- package/dist/types/entities/content/reference.d.ts +0 -101
- package/dist/types/entities/content/reference.d.ts.map +0 -1
- package/dist/types/entities/field/policies.d.ts +0 -35
- package/dist/types/entities/field/policies.d.ts.map +0 -1
- package/dist/types/entities/response/response-validation.d.ts +0 -75
- package/dist/types/entities/response/response-validation.d.ts.map +0 -1
- package/dist/types/entities/session/session.d.ts +0 -46
- package/dist/types/entities/session/session.d.ts.map +0 -1
- package/dist/types/entities/step/step.d.ts +0 -56
- package/dist/types/entities/step/step.d.ts.map +0 -1
- package/dist/types/form/build-responses.d.ts +0 -18
- package/dist/types/form/build-responses.d.ts.map +0 -1
- package/dist/types/form/create-field-evaluator.d.ts +0 -28
- package/dist/types/form/create-field-evaluator.d.ts.map +0 -1
- package/dist/types/form/create-field-validation.d.ts +0 -60
- package/dist/types/form/create-field-validation.d.ts.map +0 -1
- package/dist/types/form/create-form.d.ts +0 -153
- package/dist/types/form/create-form.d.ts.map +0 -1
- package/dist/types/form/create-submit-pipeline.d.ts +0 -116
- package/dist/types/form/create-submit-pipeline.d.ts.map +0 -1
- package/dist/types/form/get-step-fields.d.ts +0 -19
- package/dist/types/form/get-step-fields.d.ts.map +0 -1
- package/dist/types/form/index.d.ts +0 -11
- package/dist/types/form/index.d.ts.map +0 -1
- package/dist/types/lifecycle/condition-selection.d.ts +0 -146
- package/dist/types/lifecycle/condition-selection.d.ts.map +0 -1
- package/dist/types/lifecycle/lifecycle.d.ts +0 -48
- package/dist/types/lifecycle/lifecycle.d.ts.map +0 -1
- package/dist/types/lifecycle/rules-logic.d.ts +0 -25
- package/dist/types/lifecycle/rules-logic.d.ts.map +0 -1
- package/dist/types/lifecycle/state-snapshot.d.ts +0 -38
- package/dist/types/lifecycle/state-snapshot.d.ts.map +0 -1
- package/dist/types/plugins/dom-observer/index.d.ts +0 -3
- package/dist/types/plugins/dom-observer/index.d.ts.map +0 -1
- package/dist/types/plugins/dom-observer/plugin.d.ts +0 -50
- package/dist/types/plugins/dom-observer/plugin.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/hash.d.ts +0 -105
- package/dist/types/plugins/dynamic-experiences/hash.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/index.d.ts +0 -7
- package/dist/types/plugins/dynamic-experiences/index.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts +0 -49
- package/dist/types/plugins/dynamic-experiences/plugin.d.ts.map +0 -1
- package/dist/types/plugins/dynamic-experiences/types.d.ts +0 -45
- package/dist/types/plugins/dynamic-experiences/types.d.ts.map +0 -1
- package/dist/types/plugins/experience-browser-storage/index.d.ts.map +0 -1
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts +0 -7
- package/dist/types/plugins/experience-browser-storage/plugin.d.ts.map +0 -1
- package/dist/types/plugins/history-browser-storage/index.d.ts.map +0 -1
- package/dist/types/plugins/history-browser-storage/plugin.d.ts.map +0 -1
- package/dist/types/plugins/responses-browser-storage/index.d.ts.map +0 -1
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts +0 -18
- package/dist/types/plugins/responses-browser-storage/plugin.d.ts.map +0 -1
- package/dist/types/plugins/responses-indexeddb/index.d.ts.map +0 -1
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts +0 -3
- package/dist/types/plugins/responses-indexeddb/plugin.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/emit.d.ts +0 -18
- package/dist/types/plugins/telemetry/emit.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/index.d.ts +0 -4
- package/dist/types/plugins/telemetry/index.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/plugin-summary.d.ts +0 -10
- package/dist/types/plugins/telemetry/plugin-summary.d.ts.map +0 -1
- package/dist/types/plugins/telemetry/plugin.d.ts +0 -45
- package/dist/types/plugins/telemetry/plugin.d.ts.map +0 -1
- package/dist/types/plugins/web-components/index.d.ts +0 -2
- package/dist/types/plugins/web-components/index.d.ts.map +0 -1
- package/dist/types/plugins/web-components/plugin.d.ts +0 -4
- package/dist/types/plugins/web-components/plugin.d.ts.map +0 -1
- package/dist/types/preview/index.d.ts +0 -18
- package/dist/types/preview/index.d.ts.map +0 -1
- package/dist/types/preview-bridge/index.d.ts +0 -14
- package/dist/types/preview-bridge/index.d.ts.map +0 -1
- package/dist/types/preview-channel.d.ts +0 -16
- package/dist/types/preview-channel.d.ts.map +0 -1
- package/dist/types/preview-receiver/apply-ops.d.ts +0 -32
- package/dist/types/preview-receiver/apply-ops.d.ts.map +0 -1
- package/dist/types/preview-receiver/index.d.ts +0 -32
- package/dist/types/preview-receiver/index.d.ts.map +0 -1
- package/dist/types/preview-receiver/protocol.d.ts +0 -69
- package/dist/types/preview-receiver/protocol.d.ts.map +0 -1
- package/dist/types/schema-registry.d.ts +0 -206
- package/dist/types/schema-registry.d.ts.map +0 -1
- package/dist/types/server/serialize.d.ts +0 -87
- package/dist/types/server/serialize.d.ts.map +0 -1
- package/dist/types/typed-content.d.ts +0 -17
- package/dist/types/typed-content.d.ts.map +0 -1
- package/dist/types/utils/client-telemetry.d.ts +0 -25
- package/dist/types/utils/client-telemetry.d.ts.map +0 -1
- package/dist/types/utils/content-path.d.ts +0 -37
- package/dist/types/utils/content-path.d.ts.map +0 -1
- package/dist/types/utils/html-asset-value.d.ts +0 -20
- package/dist/types/utils/html-asset-value.d.ts.map +0 -1
- package/dist/types/utils/inert-script-report.d.ts +0 -40
- package/dist/types/utils/inert-script-report.d.ts.map +0 -1
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts +0 -25
- package/dist/types/utils/node-tree/get-next-node-from-action.d.ts.map +0 -1
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts +0 -17
- package/dist/types/utils/node-tree/get-next-node-from-condition.d.ts.map +0 -1
- package/dist/types/utils/picked-config.d.ts +0 -39
- package/dist/types/utils/picked-config.d.ts.map +0 -1
- package/dist/types/utils/preview-session.d.ts +0 -12
- package/dist/types/utils/preview-session.d.ts.map +0 -1
- package/dist/types/utils/rehydrate-scripts.d.ts +0 -50
- package/dist/types/utils/rehydrate-scripts.d.ts.map +0 -1
- package/dist/types/utils/render-string.d.ts +0 -24
- package/dist/types/utils/render-string.d.ts.map +0 -1
- package/dist/types/utils/user-timing.d.ts +0 -21
- package/dist/types/utils/user-timing.d.ts.map +0 -1
- package/dist/version-BvLZaTMC.cjs +0 -1
- package/dist/version-VvasRUfR.js +0 -256
- /package/dist/types/plugins/{experience-browser-storage → experience-browserstorage-plugin}/index.d.ts +0 -0
- /package/dist/types/plugins/{history-browser-storage → history-browserstorage-plugin}/index.d.ts +0 -0
- /package/dist/types/plugins/{responses-browser-storage → responses-browserstorage-plugin}/index.d.ts +0 -0
- /package/dist/types/plugins/{responses-indexeddb → responses-indexeddb-plugin}/index.d.ts +0 -0
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: explanation
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# About the content model
|
|
7
|
-
|
|
8
|
-
Picked splits your content into three pieces: a Model, a Block, and a content entry.
|
|
9
|
-
Why three, when a page editor needs only one?
|
|
10
|
-
|
|
11
|
-
## Schema and data are separate
|
|
12
|
-
|
|
13
|
-
A **Model** is a schema. It sets which fields a piece of content can hold, and it holds
|
|
14
|
-
no data itself. A **content entry** is one instance of that schema, filled with real
|
|
15
|
-
values.
|
|
16
|
-
|
|
17
|
-
One Model backs many entries. Describe a campaign page one time, then make many pages
|
|
18
|
-
from it. Each entry carries its own title, its own body, and its own image, but they all
|
|
19
|
-
share the shape.
|
|
20
|
-
|
|
21
|
-
That split is also what lets your code depend on content that it never saw. Your component
|
|
22
|
-
reads `content.title` because the Model promises a `title`. It works for every entry that
|
|
23
|
-
comes from that Model.
|
|
24
|
-
|
|
25
|
-
## A category gives a Model a role
|
|
26
|
-
|
|
27
|
-
A Model can carry a **category**, and the category decides what the Model gives its shape
|
|
28
|
-
to. A **page layout** backs a standalone Page. A **step layout** backs one Step inside a
|
|
29
|
-
Flow.
|
|
30
|
-
|
|
31
|
-
The category is fixed because it decides where the SDK renders the entry. That is not a
|
|
32
|
-
property that you can change under an entry that exists already.
|
|
33
|
-
|
|
34
|
-
A Model can also carry no category. Such a Model has no layout role, and nothing renders
|
|
35
|
-
its entries directly. It holds the content that other content points at, such as a
|
|
36
|
-
product or a category of your own. See
|
|
37
|
-
[About content references](/explanation/content-references).
|
|
38
|
-
|
|
39
|
-
The three roles are one machine. A layout is a Model with a job in the render path. A
|
|
40
|
-
Model with no category is the same machine with no such job.
|
|
41
|
-
|
|
42
|
-
## A Block is a schema fragment
|
|
43
|
-
|
|
44
|
-
A Model gives shape to a whole page or a whole step. A **Block** is a part that you put
|
|
45
|
-
inside one or more Models.
|
|
46
|
-
|
|
47
|
-
Define a hero one time as a Block, then point at it from every Model that needs one.
|
|
48
|
-
Change the Block and every Model that holds it changes with it.
|
|
49
|
-
|
|
50
|
-
This is the reason Blocks exist at all. Without them you must describe a common
|
|
51
|
-
structure again in each Model, and the copies then become different. It is the same
|
|
52
|
-
argument for one fact in one place that runs through the rest of this documentation.
|
|
53
|
-
|
|
54
|
-
A Block sits **inside** the entry that embeds it. It has no entry of its own, and no id
|
|
55
|
-
that you can point at.
|
|
56
|
-
|
|
57
|
-
That is the difference between a Block and a reference. A Block is a shape that many
|
|
58
|
-
entries hold. A reference is a pointer at one entry that many entries share.
|
|
59
|
-
|
|
60
|
-
## Why a schema change does not migrate your data
|
|
61
|
-
|
|
62
|
-
Change a Model or a Block, and Picked does not rewrite the entries behind it. An entry
|
|
63
|
-
that no longer matches its schema becomes invalid, and the dashboard shows an error on
|
|
64
|
-
each field that does not fit.
|
|
65
|
-
|
|
66
|
-
That is deliberate. An automatic change must decide what a new required field holds for
|
|
67
|
-
every entry that came before it. Any value that it chooses is content that nobody wrote.
|
|
68
|
-
Picked reports the error instead, and you correct it.
|
|
69
|
-
|
|
70
|
-
The cost is real. After a schema change, check every entry that uses that Model and fix
|
|
71
|
-
each error before you publish. Picked serves valid content only, so an entry with an error
|
|
72
|
-
does not reach a visitor.
|
|
73
|
-
|
|
74
|
-
## An error points at the exact field
|
|
75
|
-
|
|
76
|
-
A validation error carries a path in JSON style, such as `sections[0].data.title`. The
|
|
77
|
-
path holds through nested groups, repeated fields, and Blocks. An error inside a
|
|
78
|
-
repeated group therefore tells you which item in that group holds it.
|
|
79
|
-
|
|
80
|
-
## Related
|
|
81
|
-
|
|
82
|
-
- [Models](/reference/dashboard/content/models) — every field type.
|
|
83
|
-
- [Blocks](/reference/dashboard/content/blocks) — the reusable fragments.
|
|
84
|
-
- [Content entries](/reference/dashboard/content/content-entries) — the editor and the
|
|
85
|
-
validation.
|
|
86
|
-
- [About content references](/explanation/content-references) — how one entry points at another.
|
|
87
|
-
- [About pages and flows](/explanation/pages-and-flows) — which category you need.
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: explanation
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# About the two APIs
|
|
7
|
-
|
|
8
|
-
Picked has two HTTP APIs, and a new reader often reaches for the wrong one. This page
|
|
9
|
-
covers which is which and why they are separate.
|
|
10
|
-
|
|
11
|
-
## The split
|
|
12
|
-
|
|
13
|
-
| | Delivery API | Management API |
|
|
14
|
-
| --- | --- | --- |
|
|
15
|
-
| Style | REST | GraphQL |
|
|
16
|
-
| Access | Public, anonymous | Authenticated |
|
|
17
|
-
| Operations | Read-only | Read and write |
|
|
18
|
-
| Base | `https://api.picked.app/api/v1` | `POST https://api.picked.app/api/graphql` |
|
|
19
|
-
| Use it to | Serve published configuration and content to your application | Control your projects, experiences, and content |
|
|
20
|
-
|
|
21
|
-
The short rule is this: **the Delivery API serves your visitors, and the management API
|
|
22
|
-
serves you.**
|
|
23
|
-
|
|
24
|
-
## Why they are not one API
|
|
25
|
-
|
|
26
|
-
Three properties of the delivery path make it a different kind of API.
|
|
27
|
-
|
|
28
|
-
**It is anonymous.** A crawler must read your published page content with no credential at
|
|
29
|
-
all. An API that requires a token cannot serve a search engine, and an API that serves a
|
|
30
|
-
search engine cannot require one.
|
|
31
|
-
|
|
32
|
-
**It is cacheable.** A published response is the same for every reader, so a shared cache
|
|
33
|
-
can hold it. The Delivery API sends `s-maxage` for an SDK request, and it sends
|
|
34
|
-
`Vary: Picked-Client`. A GraphQL endpoint that takes any query over a `POST` has none of
|
|
35
|
-
those properties.
|
|
36
|
-
|
|
37
|
-
**It is read-only.** Nothing that a reader reaches without a credential can change your
|
|
38
|
-
data. Every write stays on a separate authenticated surface, so that property holds by
|
|
39
|
-
design.
|
|
40
|
-
|
|
41
|
-
## What the Delivery API serves
|
|
42
|
-
|
|
43
|
-
Two endpoints, and the SDK calls both:
|
|
44
|
-
|
|
45
|
-
- **Project config** returns the published configuration of a project: its experiences and
|
|
46
|
-
steps, and the content link on each step.
|
|
47
|
-
- **Experience content** returns the content entries behind an experience.
|
|
48
|
-
|
|
49
|
-
Your server usually calls the first and lets `serialize()` call the second. See
|
|
50
|
-
[About server-side rendering](/explanation/why-server-side-rendering).
|
|
51
|
-
|
|
52
|
-
## How a preview stays out of the search index
|
|
53
|
-
|
|
54
|
-
A preview needs unpublished content, and by the definition of it that content is not
|
|
55
|
-
public. The Delivery API takes a `preview_token` query parameter for exactly that. It then
|
|
56
|
-
treats the result differently. `versionId` comes back `null`, the response is `no-store`,
|
|
57
|
-
and `robots.txt` does not allow the preview path.
|
|
58
|
-
|
|
59
|
-
That last part matters more than it looks. A draft that anybody can read over an anonymous
|
|
60
|
-
URL is a draft that a search engine can find. A campaign page that is only part complete
|
|
61
|
-
can then appear in the search results of a customer.
|
|
62
|
-
|
|
63
|
-
## Related
|
|
64
|
-
|
|
65
|
-
- [Delivery API](/reference/delivery-api) — the endpoints and their responses.
|
|
66
|
-
- [Management API](/reference/management-api/authentication) — authentication and scopes.
|
|
67
|
-
- [Preview, cache, and crawlers](/reference/delivery-api/preview-caching-crawling) — the
|
|
68
|
-
exact cache rules and `robots.txt` rules.
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: explanation
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# About server-side rendering
|
|
7
|
-
|
|
8
|
-
Why does a Page need a snapshot, when the SDK can fetch its content in the browser?
|
|
9
|
-
Because the reader that matters most does not run JavaScript.
|
|
10
|
-
|
|
11
|
-
## The constraint
|
|
12
|
-
|
|
13
|
-
A crawler and a social preview read the HTML your server returns, and they do not wait for
|
|
14
|
-
the browser to fetch anything. If the content of a Page arrives after the first response,
|
|
15
|
-
those readers never see it.
|
|
16
|
-
|
|
17
|
-
So the content has to be in the HTML. That means your server has to know, before it
|
|
18
|
-
answers, which experiences match this URL and what their content is.
|
|
19
|
-
|
|
20
|
-
## What the snapshot is for
|
|
21
|
-
|
|
22
|
-
`serialize()` answers that question on the server. It registers your project configuration and
|
|
23
|
-
evaluates each experience condition against the URL. It then reads the content for each
|
|
24
|
-
experience that matches, and returns a `PickedSnapshot` as plain JSON.
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
projectConfig (Delivery API)
|
|
28
|
-
-> serialize(client, params) on the server -> PickedSnapshot
|
|
29
|
-
-> embed snapshot in HTML
|
|
30
|
-
-> client seeds from snapshot -> renders the same markup -> hydrates
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The snapshot carries the exact options the server chose with, and the condition results it
|
|
34
|
-
reached. The first render in the browser therefore reuses the decisions of the server. It
|
|
35
|
-
does not evaluate them a second time.
|
|
36
|
-
|
|
37
|
-
That last point is the whole reason the snapshot holds condition results and not only
|
|
38
|
-
content. A browser that evaluates the conditions itself can reach a different answer. A different URL shape, a
|
|
39
|
-
different time, or a different flag value each give a different result. The markup then does not
|
|
40
|
-
match what the server sent, and hydration discards the server HTML. That failure is the
|
|
41
|
-
one server-side rendering exists to prevent.
|
|
42
|
-
|
|
43
|
-
## Why a slot instead of a selector
|
|
44
|
-
|
|
45
|
-
A browser-rendered flow points at a DOM selector, and the SDK inserts the component next
|
|
46
|
-
to the element that it finds. That cannot work on a server, because a server has no DOM
|
|
47
|
-
to search.
|
|
48
|
-
|
|
49
|
-
A slot reverses that. `<ExperienceSlot name="page" />` is a mount point that you place in
|
|
50
|
-
your own markup. An experience joins it when its target selector is `.picked-slot-<name>`.
|
|
51
|
-
Your component tree decides where the content goes, so the server renders it in one pass.
|
|
52
|
-
|
|
53
|
-
## Why placements have an order
|
|
54
|
-
|
|
55
|
-
More than one experience can point at the same slot, so the slot needs a rule. The order
|
|
56
|
-
is:
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
replace -> before -> prepend -> append -> after
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
`replace` wins: an active experience with that placement renders alone. Every other active
|
|
63
|
-
experience renders in the order above.
|
|
64
|
-
|
|
65
|
-
The rule exists so the outcome does not depend on which experience came first. Two editors
|
|
66
|
-
can add an experience to the same slot on the same day. The result then follows from the
|
|
67
|
-
placements, and not from the database.
|
|
68
|
-
|
|
69
|
-
## Related
|
|
70
|
-
|
|
71
|
-
- [Your first server-rendered page](/tutorials/first-server-rendered-page) — the whole
|
|
72
|
-
path, in practice.
|
|
73
|
-
- [Server snapshot](/reference/sdk/ssr/serialize) — every `serialize()` parameter.
|
|
74
|
-
- [Slots and placements](/reference/sdk/ssr/slots-and-placements) — the exact rules for
|
|
75
|
-
the order.
|
|
76
|
-
- [About pages and flows](/explanation/pages-and-flows) — which kind you need.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: explanation
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# About workspaces and versions
|
|
7
|
-
|
|
8
|
-
Why can you not edit what your visitors see? Because Picked keeps two things separate on
|
|
9
|
-
purpose: the work in progress, and the thing that it serves.
|
|
10
|
-
|
|
11
|
-
## The two states
|
|
12
|
-
|
|
13
|
-
A **workspace** holds your changes. Edit a flow, a feature flag, a step, a field, an
|
|
14
|
-
action, or a condition, and the change stays in the workspace. No visitor sees it.
|
|
15
|
-
|
|
16
|
-
A **version** is what your visitors get. When you publish, Picked takes the current
|
|
17
|
-
workspace and makes an immutable snapshot of it. A project serves exactly one version at a
|
|
18
|
-
time, the live one.
|
|
19
|
-
|
|
20
|
-
Everything else follows from that split.
|
|
21
|
-
|
|
22
|
-
## Why the snapshot is immutable
|
|
23
|
-
|
|
24
|
-
A published version cannot change. That is what makes a roll-back safe. When you restore
|
|
25
|
-
an earlier version, Picked moves the live pointer of the project and changes no data. The
|
|
26
|
-
version that you restore is the exact version that was live before, and not a copy that
|
|
27
|
-
Picked builds again.
|
|
28
|
-
|
|
29
|
-
It is also what lets your draft continue. When you publish, your workspace stays
|
|
30
|
-
editable, and a roll-back discards no draft. The two move at their own speed.
|
|
31
|
-
|
|
32
|
-
## The three workspace states
|
|
33
|
-
|
|
34
|
-
- **Live** — the workspace whose snapshot the SDK serves. Each project has exactly one.
|
|
35
|
-
- **Draft** — a workspace that no visitor sees. Edit it, see a preview of it, publish it.
|
|
36
|
-
- **Archived** — a draft that you put to one side. It is still editable, but it is out of
|
|
37
|
-
the default list.
|
|
38
|
-
|
|
39
|
-
Picked keeps these two operations separate on purpose. Archive a draft when you are not
|
|
40
|
-
certain about it. You cannot reverse a delete, but you can always unarchive.
|
|
41
|
-
|
|
42
|
-
## Why the publish modal shows a diff
|
|
43
|
-
|
|
44
|
-
It is the one step in the dashboard that you cannot take back. It is therefore the one
|
|
45
|
-
place that shows you exactly what changes. The modal compares the current workspace
|
|
46
|
-
against the last published snapshot. It puts the changes into groups, and marks each row
|
|
47
|
-
added, removed, or modified.
|
|
48
|
-
|
|
49
|
-
The diff also carries a warning that a plain list of changes cannot give you. Some changes
|
|
50
|
-
break other records. Remove a field while steps still point at it, and those steps
|
|
51
|
-
now have an error. The preview shows that above the diff, before you publish and not after.
|
|
52
|
-
|
|
53
|
-
The first publish of a workspace has no earlier snapshot to compare against, so the modal
|
|
54
|
-
shows the contents instead of a diff.
|
|
55
|
-
|
|
56
|
-
## A preview does not reach production
|
|
57
|
-
|
|
58
|
-
A preview sends the workspace state to the SDK in the query parameters. Your unpublished
|
|
59
|
-
workspace therefore applies to your browser and to nothing else. The visitors on your live
|
|
60
|
-
site see no change.
|
|
61
|
-
|
|
62
|
-
One result of this matters. In a preview the SDK stores a feature flag decision in session
|
|
63
|
-
storage and not in local storage. A preview allocation is therefore disposable, and it can
|
|
64
|
-
differ from a production one. See
|
|
65
|
-
[About feature flag allocation](/explanation/feature-flag-allocation).
|
|
66
|
-
|
|
67
|
-
## Related
|
|
68
|
-
|
|
69
|
-
- [About how Picked works](/explanation/how-picked-works) — what a publish feeds.
|
|
70
|
-
- [Workspaces](/reference/dashboard/workspaces) — the states and the settings.
|
|
71
|
-
- [Publish history](/reference/dashboard/workspace-versioning) — the version list.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to add a step, a field, an action, or a condition
|
|
7
|
-
|
|
8
|
-
This guide shows you how to create the parts that a flow is built from. All four follow
|
|
9
|
-
the same shape, and all four belong to the project: you can use one in more than one flow.
|
|
10
|
-
|
|
11
|
-
## Steps
|
|
12
|
-
|
|
13
|
-
1. Open a flow. The library is on the left of the flow builder.
|
|
14
|
-
2. Find the **Steps**, **Fields**, **Actions**, or **Conditions** section in it.
|
|
15
|
-
3. Click the **+** next to that section.
|
|
16
|
-
4. Enter a name. The dashboard makes the key from it.
|
|
17
|
-
5. Click the **Create** button for that kind: **Create step**, **Create field**,
|
|
18
|
-
**Create action**, **Create condition**.
|
|
19
|
-
|
|
20
|
-
The flow builder opens again, and the new one is in the library.
|
|
21
|
-
|
|
22
|
-
**Fields** also has its own sidebar entry, so you can make a field without a flow. A step,
|
|
23
|
-
an action, and a condition belong to a flow, and the library is the only way to reach
|
|
24
|
-
them.
|
|
25
|
-
|
|
26
|
-
The key is the identifier that your application uses. You set it one time, and you cannot
|
|
27
|
-
change it later. Your visitors never see a name or a key.
|
|
28
|
-
|
|
29
|
-
## What each one needs after that
|
|
30
|
-
|
|
31
|
-
| Kind | Set this next |
|
|
32
|
-
| --- | --- |
|
|
33
|
-
| Step | A **Layout**, such as `card`, `modal`, or `fullscreen`. |
|
|
34
|
-
| Field | A **Label**, a type, and any validation rule. |
|
|
35
|
-
| Action | Nothing in the dashboard. Register the handler in your code. |
|
|
36
|
-
| Condition | The rule, in the **Logic** section of the inspector. |
|
|
37
|
-
|
|
38
|
-
## Related
|
|
39
|
-
|
|
40
|
-
- [How to build a flow](/how-to/build-a-flow) — put it on the canvas.
|
|
41
|
-
- [How to write a condition](/how-to/write-a-condition)
|
|
42
|
-
- [How to register an action handler](/how-to/register-an-action-handler)
|
|
43
|
-
- [How to reuse a step, a field, or an action](/how-to/reuse-a-step-field-or-action)
|
|
@@ -1,316 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: how-to
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# How to run an analytics query
|
|
7
|
-
|
|
8
|
-
This guide gives you a query for each common analytics question. Copy one, put your own
|
|
9
|
-
project ID in the `WHERE` clause, and run it.
|
|
10
|
-
|
|
11
|
-
Every query must carry a tenant filter. See
|
|
12
|
-
[About PickedQL](/explanation/how-pickedql-works) for why, and
|
|
13
|
-
[Data sources](/reference/pickedql/data-sources) for every table.
|
|
14
|
-
|
|
15
|
-
## Daily A/B test trend
|
|
16
|
-
|
|
17
|
-
```sql
|
|
18
|
-
SELECT
|
|
19
|
-
project_local_date,
|
|
20
|
-
control_users() AS control,
|
|
21
|
-
variant_users() AS variant
|
|
22
|
-
FROM metrics
|
|
23
|
-
WHERE project_id = '{{ your project ID }}'
|
|
24
|
-
AND project_local_date >= '2026-04-01'
|
|
25
|
-
GROUP BY project_local_date
|
|
26
|
-
ORDER BY project_local_date
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
**Result:**
|
|
30
|
-
|
|
31
|
-
| project_local_date | control | variant |
|
|
32
|
-
| ----------------- | ------- | ------- |
|
|
33
|
-
| 2026-04-11 | 4361 | 101 |
|
|
34
|
-
| 2026-04-12 | 4178 | 126 |
|
|
35
|
-
| 2026-04-13 | 5008 | 176 |
|
|
36
|
-
|
|
37
|
-
## Conversion rate uplift by date
|
|
38
|
-
|
|
39
|
-
```sql
|
|
40
|
-
SELECT
|
|
41
|
-
project_local_date,
|
|
42
|
-
control_conversion_rate() AS control_conversion_rate,
|
|
43
|
-
variant_conversion_rate() AS variant_conversion_rate,
|
|
44
|
-
conversion_rate_uplift() AS conversion_rate_uplift_pct
|
|
45
|
-
FROM metrics
|
|
46
|
-
WHERE project_id = '{{ your project ID }}'
|
|
47
|
-
AND project_local_date >= '2026-04-01'
|
|
48
|
-
GROUP BY project_local_date
|
|
49
|
-
ORDER BY project_local_date
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**Result:**
|
|
53
|
-
|
|
54
|
-
| project_local_date | control_conversion_rate | variant_conversion_rate | conversion_rate_uplift_pct |
|
|
55
|
-
| ----------------- | ----------------------- | ----------------------- | -------------------------- |
|
|
56
|
-
| 2026-04-01 | 0.0322 | 0.0349 | 0.0349 |
|
|
57
|
-
| 2026-04-02 | 0.0398 | 0.0416 | 0.0416 |
|
|
58
|
-
| 2026-04-03 | 0.0462 | 0 | -0.0001 |
|
|
59
|
-
|
|
60
|
-
## Custom conversion rate definition
|
|
61
|
-
|
|
62
|
-
Override the default conversion, which counts a `purchase` event, with your own
|
|
63
|
-
numerator and denominator. Use this when a form submission, a lead capture, or
|
|
64
|
-
another event of your own defines a conversion.
|
|
65
|
-
|
|
66
|
-
```sql
|
|
67
|
-
-- Lead capture conversion: form submissions / lead-capture step entries
|
|
68
|
-
SELECT
|
|
69
|
-
project_local_date,
|
|
70
|
-
control_conversion_rate(
|
|
71
|
-
numerator='event_type=form_submit_success',
|
|
72
|
-
denominator='step_id=lead-capture-step'
|
|
73
|
-
) AS control_lead_cr,
|
|
74
|
-
variant_conversion_rate(
|
|
75
|
-
numerator='event_type=form_submit_success',
|
|
76
|
-
denominator='step_id=lead-capture-step'
|
|
77
|
-
) AS variant_lead_cr
|
|
78
|
-
FROM events
|
|
79
|
-
WHERE project_id = '{{ your project ID }}'
|
|
80
|
-
AND client_local_date >= '2026-04-01'
|
|
81
|
-
GROUP BY project_local_date
|
|
82
|
-
ORDER BY project_local_date
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
You can also combine multiple events with `OR` and group with parentheses:
|
|
86
|
-
|
|
87
|
-
```sql
|
|
88
|
-
-- A `checkout_complete` event or an `order_create` event counts as a conversion.
|
|
89
|
-
SELECT
|
|
90
|
-
control_conversion_rate(
|
|
91
|
-
'event_type=checkout_complete OR event_type=order_create'
|
|
92
|
-
) AS control_cr,
|
|
93
|
-
variant_conversion_rate(
|
|
94
|
-
'event_type=checkout_complete OR event_type=order_create'
|
|
95
|
-
) AS variant_cr
|
|
96
|
-
FROM events
|
|
97
|
-
WHERE project_id = '{{ your project ID }}'
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Your own segment with `control_users` and `variant_users`
|
|
101
|
-
|
|
102
|
-
On `events`, four functions take an optional filter string: `control_users`,
|
|
103
|
-
`variant_users`, `control_sessions`, and `variant_sessions`. The filter counts only a
|
|
104
|
-
user or a session that matches your expression. It applies together with the
|
|
105
|
-
`variant_type` filter that PickedQL adds.
|
|
106
|
-
|
|
107
|
-
```sql
|
|
108
|
-
-- The control users who fired an `app_initialize` event, by step.
|
|
109
|
-
SELECT
|
|
110
|
-
step_id,
|
|
111
|
-
control_users('event_type=app_initialize') AS control_initialized,
|
|
112
|
-
variant_users('event_type=app_initialize') AS variant_initialized
|
|
113
|
-
FROM events
|
|
114
|
-
WHERE project_id = '{{ your project ID }}'
|
|
115
|
-
AND client_local_date >= '2026-04-01'
|
|
116
|
-
GROUP BY step_id
|
|
117
|
-
ORDER BY control_initialized DESC
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
The named form (`filter=`) is also supported:
|
|
121
|
-
|
|
122
|
-
```sql
|
|
123
|
-
SELECT control_users(filter='event_type=form_submit AND step_id=lead-capture') FROM events
|
|
124
|
-
WHERE project_id = '{{ your project ID }}'
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Conversion rate from nested virtual functions
|
|
128
|
-
|
|
129
|
-
The numerator and the denominator can come from different segments. An example is the
|
|
130
|
-
control users who fired an event of your own, divided by **all** users and not by the
|
|
131
|
-
control users alone. For that, pass a virtual function call directly as an argument
|
|
132
|
-
of the conversion rate:
|
|
133
|
-
|
|
134
|
-
```sql
|
|
135
|
-
-- The control users who fired `app_initialize`, over all users of every variant.
|
|
136
|
-
SELECT
|
|
137
|
-
control_conversion_rate(
|
|
138
|
-
control_users('event_type=app_initialize'),
|
|
139
|
-
all_users()
|
|
140
|
-
) AS control_initialize_rate
|
|
141
|
-
FROM events
|
|
142
|
-
WHERE project_id = '{{ your project ID }}'
|
|
143
|
-
AND client_local_date >= '2026-04-01'
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
## A/B test by device
|
|
147
|
-
|
|
148
|
-
```sql
|
|
149
|
-
SELECT
|
|
150
|
-
device_category,
|
|
151
|
-
control_users() AS control,
|
|
152
|
-
variant_users() AS variant
|
|
153
|
-
FROM metrics
|
|
154
|
-
WHERE project_id = '{{ your project ID }}'
|
|
155
|
-
GROUP BY device_category
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
**Result:**
|
|
159
|
-
|
|
160
|
-
| device_category | control | variant |
|
|
161
|
-
| --------------- | ------- | ------- |
|
|
162
|
-
| Phone | 193430 | 1723 |
|
|
163
|
-
| Desktop | 23423 | 309 |
|
|
164
|
-
| Tablet | 13294 | 65 |
|
|
165
|
-
|
|
166
|
-
## Daily A/B test trend by device
|
|
167
|
-
|
|
168
|
-
Combine date and device dimensions to spot device-specific trends:
|
|
169
|
-
|
|
170
|
-
```sql
|
|
171
|
-
SELECT
|
|
172
|
-
project_local_date,
|
|
173
|
-
device_category,
|
|
174
|
-
control_users() AS control,
|
|
175
|
-
variant_users() AS variant
|
|
176
|
-
FROM metrics
|
|
177
|
-
WHERE project_id = '{{ your project ID }}'
|
|
178
|
-
AND project_local_date >= '2026-04-01'
|
|
179
|
-
GROUP BY project_local_date, device_category
|
|
180
|
-
ORDER BY project_local_date, device_category
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**Result:**
|
|
184
|
-
|
|
185
|
-
| project_local_date | device_category | control | variant |
|
|
186
|
-
| ----------------- | --------------- | ------- | ------- |
|
|
187
|
-
| 2026-04-13 | Tablet | 175 | 2 |
|
|
188
|
-
| 2026-04-14 | Desktop | 37 | 1 |
|
|
189
|
-
| 2026-04-14 | Phone | 244 | 1 |
|
|
190
|
-
|
|
191
|
-
## Purchase by UTM source
|
|
192
|
-
|
|
193
|
-
```sql
|
|
194
|
-
SELECT
|
|
195
|
-
utm_source,
|
|
196
|
-
all_users() AS users,
|
|
197
|
-
all_purchase_users() AS purchasers
|
|
198
|
-
FROM metrics
|
|
199
|
-
WHERE project_id = '{{ your project ID }}'
|
|
200
|
-
GROUP BY utm_source
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Result:**
|
|
204
|
-
|
|
205
|
-
| utm_source | users | purchasers |
|
|
206
|
-
| ---------- | ------ | ---------- |
|
|
207
|
-
| `meta` | 12031 | 101 |
|
|
208
|
-
| `fb` | 3656 | 31 |
|
|
209
|
-
| `an` | 100366 | 299 |
|
|
210
|
-
|
|
211
|
-
## Step funnel for variant users
|
|
212
|
-
|
|
213
|
-
Count unique variant users per step to understand the conversion funnel:
|
|
214
|
-
|
|
215
|
-
```sql
|
|
216
|
-
SELECT
|
|
217
|
-
step_id,
|
|
218
|
-
variant_users() AS variant
|
|
219
|
-
FROM metrics
|
|
220
|
-
WHERE project_id = '{{ your project ID }}'
|
|
221
|
-
AND project_local_date >= '2026-04-01'
|
|
222
|
-
GROUP BY step_id
|
|
223
|
-
ORDER BY variant DESC
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
**Result:**
|
|
227
|
-
|
|
228
|
-
| step_id | variant |
|
|
229
|
-
| ------------------------------ | ------- |
|
|
230
|
-
| `who-are-you-protecting-step` | 1093 |
|
|
231
|
-
| `about-yourself-step` | 533 |
|
|
232
|
-
| `date-of-birth-step` | 435 |
|
|
233
|
-
| `employment-status-step` | 408 |
|
|
234
|
-
| `nicotine-usage-step` | 407 |
|
|
235
|
-
| `coverage-motivation-step` | 405 |
|
|
236
|
-
| `lead-capture-step` | 398 |
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
## Sankey — overall user journey
|
|
240
|
-
|
|
241
|
-
A forward window from the starting step. A user who never reaches `targeting_step`
|
|
242
|
-
still gives edges, up to `num_nodes_after_start`.
|
|
243
|
-
|
|
244
|
-
```sql
|
|
245
|
-
SELECT source, target, users FROM experience_journey
|
|
246
|
-
WHERE project_id = '{{ your project ID }}'
|
|
247
|
-
AND starting_step = '{{ starting step ID }}'
|
|
248
|
-
AND targeting_step = '{{ target step ID }}'
|
|
249
|
-
AND num_nodes_after_start = 10
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
**Result:**
|
|
253
|
-
|
|
254
|
-
| source | target | users |
|
|
255
|
-
| ------------------------- | ------------------------- | ----- |
|
|
256
|
-
| `001. step-start` | `002. step-questionnaire-1` | 182 |
|
|
257
|
-
| `002. step-questionnaire-1` | `003. step-quote` | 144 |
|
|
258
|
-
| `003. step-quote` | `004. step-target` | 121 |
|
|
259
|
-
|
|
260
|
-
## Sankey — the top paths to a target step
|
|
261
|
-
|
|
262
|
-
A backward window anchored at the target. It also ranks the paths and keeps the ones
|
|
263
|
-
with the most users.
|
|
264
|
-
|
|
265
|
-
```sql
|
|
266
|
-
SELECT source, target, users FROM experience_journey
|
|
267
|
-
WHERE project_id = '{{ your project ID }}'
|
|
268
|
-
AND experience_id = '{{ experience ID }}'
|
|
269
|
-
AND starting_step = '{{ starting step ID }}'
|
|
270
|
-
AND targeting_step = '{{ target step ID }}'
|
|
271
|
-
AND num_nodes_before_target = 5
|
|
272
|
-
AND top_n_path = 10
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
## Sankey — drop-off view
|
|
276
|
-
|
|
277
|
-
Starts at `starting_step` and emits every consecutive transition until `num_nodes_after_start` steps later (no target).
|
|
278
|
-
|
|
279
|
-
```sql
|
|
280
|
-
SELECT source, target, users FROM experience_journey
|
|
281
|
-
WHERE project_id = '{{ your project ID }}'
|
|
282
|
-
AND experience_id = '{{ experience ID }}'
|
|
283
|
-
AND starting_step = '{{ starting step ID }}'
|
|
284
|
-
AND num_nodes_after_start = 10
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
## List all control users for mobile (user-level)
|
|
288
|
-
|
|
289
|
-
Use `events` when you need data at the individual user level:
|
|
290
|
-
|
|
291
|
-
```sql
|
|
292
|
-
SELECT
|
|
293
|
-
device_category,
|
|
294
|
-
user_canonical_id
|
|
295
|
-
FROM events
|
|
296
|
-
WHERE project_id = '{{ your project ID }}'
|
|
297
|
-
AND device_category = 'Mobile'
|
|
298
|
-
AND variant_type = 'Control'
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
**Result:**
|
|
302
|
-
|
|
303
|
-
| device_category | user_canonical_id |
|
|
304
|
-
| --------------- | ------------------------------------ |
|
|
305
|
-
| Mobile | `019cc336-5a6a-7c32-b638-cdcc983b3e70` |
|
|
306
|
-
| Mobile | `019cc336-5a6a-7d8f-994c-69bc28e5f550` |
|
|
307
|
-
| Mobile | `019cc80f-503c-7181-b2c6-986b1f76d496` |
|
|
308
|
-
|
|
309
|
-
## Related
|
|
310
|
-
|
|
311
|
-
- [About PickedQL](/explanation/how-pickedql-works) — what the layer expands for you.
|
|
312
|
-
- [Virtual functions](/reference/pickedql/virtual-functions) — every function.
|
|
313
|
-
- [Dimensions](/reference/pickedql/dimensions) — every dimension column.
|
|
314
|
-
- [Analytics events](/reference/sdk/analytics-events) — every `event_type` value that a
|
|
315
|
-
filter can use.
|
|
316
|
-
- [Reports](/reference/dashboard/reports) — the same data as an embedded dashboard.
|