@picked/client 0.0.1-dev.1789541668638 → 0.0.1-next.2
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 +739 -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 -160
- 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 +7 -17
- 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 +8 -19
- 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 +7 -31
- 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-C7q_7vxn.js +0 -22
- package/dist/api-Ctvh1qkk.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 -35
- 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-B9S6Yf0N.js +0 -711
- package/dist/experience-instance-D8rOg6We.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-ChafFq6S.js +0 -194
- package/dist/plugin-Dn25Gffy.cjs +0 -1
- 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-B8wvmeC8.js +0 -98
- package/dist/provider-BBLlQOjV.cjs +0 -1
- 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/node-tree/node-adjacency.d.ts +0 -50
- package/dist/types/utils/node-tree/node-adjacency.d.ts.map +0 -1
- package/dist/types/utils/node-tree/node-tree-index.d.ts +0 -57
- package/dist/types/utils/node-tree/node-tree-index.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-CLjPfmxk.cjs +0 -1
- package/dist/version-CPKulHMH.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,172 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Schema
|
|
7
|
-
|
|
8
|
-
Column reference for each PickedQL data source.
|
|
9
|
-
|
|
10
|
-
## `metrics`
|
|
11
|
-
|
|
12
|
-
Pre-aggregated daily data. One row per unique combination of dimensions per day.
|
|
13
|
-
|
|
14
|
-
| Column | Type | Description |
|
|
15
|
-
|---|---|---|
|
|
16
|
-
| `project_id` | `String` | Project identifier (required in `WHERE`) |
|
|
17
|
-
| `project_local_date` | `Date` | Date in project timezone |
|
|
18
|
-
| `experience_id` | `String` | Experience identifier |
|
|
19
|
-
| `step_id` | `String` | Step identifier |
|
|
20
|
-
| `event_type` | `String` | Event type (for example `page_view`, `click`) |
|
|
21
|
-
| `interaction_type` | `String` | Interaction type (for example `Button Click`) |
|
|
22
|
-
| `variant_type` | `String` | `Control`, `Variant`, or `Unknown` |
|
|
23
|
-
| `device_category` | `String` | Device category (for example `Desktop`, `Mobile`) |
|
|
24
|
-
| `country_code` | `String` | ISO country code |
|
|
25
|
-
| `utm_source` | `String` | UTM source |
|
|
26
|
-
| `utm_medium` | `String` | UTM medium |
|
|
27
|
-
| `product_name` | `String` | Product name |
|
|
28
|
-
| `product_category` | `String` | Product category |
|
|
29
|
-
| `landing_page_url` | `String` | Landing page URL |
|
|
30
|
-
|
|
31
|
-
:::note
|
|
32
|
-
Aggregate columns (`users`, `sessions`, `events`, and so on) are not queried directly — use [virtual functions](/reference/pickedql/virtual-functions) instead.
|
|
33
|
-
:::
|
|
34
|
-
|
|
35
|
-
## `events`
|
|
36
|
-
|
|
37
|
-
User-level event data. One row per event per user. Dimension columns are joined automatically when referenced.
|
|
38
|
-
|
|
39
|
-
### Native columns
|
|
40
|
-
|
|
41
|
-
| Column | Type | Description |
|
|
42
|
-
|---|---|---|
|
|
43
|
-
| `project_id` | `String` | Project identifier (required in `WHERE`) |
|
|
44
|
-
| `event_id` | `String` | Unique event identifier |
|
|
45
|
-
| `user_canonical_id` | `String` | Canonical user identifier |
|
|
46
|
-
| `session_id` | `String` | Session identifier |
|
|
47
|
-
| `experience_id` | `String` | Experience identifier |
|
|
48
|
-
| `step_id` | `String` | Step identifier |
|
|
49
|
-
| `event_type` | `String` | Event type (for example `page_view`, `click`) |
|
|
50
|
-
| `interaction_type` | `String` | Interaction type (for example `Button Click`) |
|
|
51
|
-
| `client_local_date` | `Date` | Date in client timezone |
|
|
52
|
-
| `is_purchase` | `UInt8` | `1` if checkout complete event |
|
|
53
|
-
| `is_cart_add` | `UInt8` | `1` if cart add event |
|
|
54
|
-
| `is_first_session` | `UInt8` | `1` if first session for this user |
|
|
55
|
-
| `landing_page_url` | `String` | Landing page URL |
|
|
56
|
-
| `features` | Map(String, String) | Feature flag assignments |
|
|
57
|
-
| `feature_keys` | Map(String, String) | Feature key assignments |
|
|
58
|
-
| `event_meta` | `String` | Event metadata |
|
|
59
|
-
|
|
60
|
-
### Dimension columns (auto-joined)
|
|
61
|
-
|
|
62
|
-
These columns are joined automatically when referenced — no `JOIN` syntax needed.
|
|
63
|
-
|
|
64
|
-
| Column | Source | Description |
|
|
65
|
-
|---|---|---|
|
|
66
|
-
| `variant_type` | `dim_variant` | `Control`, `Variant`, or `Unknown` |
|
|
67
|
-
| `ab_feature_name` | `dim_variant` | A/B feature name |
|
|
68
|
-
| `ab_feature_value` | `dim_variant` | A/B feature value |
|
|
69
|
-
| `device_category` | `dim_device` | Device category |
|
|
70
|
-
| `browser_name` | `dim_device` | Browser name |
|
|
71
|
-
| `browser_version` | `dim_device` | Browser version |
|
|
72
|
-
| `os_name` | `dim_device` | The name of the operating system |
|
|
73
|
-
| `os_version` | `dim_device` | The version of the operating system |
|
|
74
|
-
| `platform` | `dim_device` | Platform |
|
|
75
|
-
| `country_code` | `dim_geo` | ISO country code |
|
|
76
|
-
| `country_name` | `dim_geo` | Country name |
|
|
77
|
-
| `region` | `dim_geo` | Region |
|
|
78
|
-
| `city` | `dim_geo` | City |
|
|
79
|
-
| `utm_source` | `dim_utm` | UTM source |
|
|
80
|
-
| `utm_medium` | `dim_utm` | UTM medium |
|
|
81
|
-
| `utm_campaign` | `dim_utm` | UTM campaign |
|
|
82
|
-
| `utm_term` | `dim_utm` | UTM term |
|
|
83
|
-
| `utm_content` | `dim_utm` | UTM content |
|
|
84
|
-
| `product_name` | `dim_product` | Product name |
|
|
85
|
-
| `product_category` | `dim_product` | Product category |
|
|
86
|
-
| `product_page` | `dim_product` | Product page |
|
|
87
|
-
| `step_title` | `steps` | Step title (joined on `project_id` + `experience_id` + `step_id`) |
|
|
88
|
-
| `experience_title` | `experiences` | Experience title (joined on `project_id` + `experience_id`) |
|
|
89
|
-
| `project_name` | `projects` | Project name |
|
|
90
|
-
| `project_timezone` | `projects` | Project timezone |
|
|
91
|
-
|
|
92
|
-
## `steps`, `experiences`, `projects`
|
|
93
|
-
|
|
94
|
-
These reference tables hold the configuration of your Picked project. PickedQL joins them
|
|
95
|
-
onto `events` when you point at one of their analyst-facing columns. Each one needs
|
|
96
|
-
its own tenant filter when you read it directly.
|
|
97
|
-
|
|
98
|
-
| Source | Real columns | Analyst columns, when you point at them from `events` | Tenant filter, when you read the table directly |
|
|
99
|
-
|---|---|---|---|
|
|
100
|
-
| `steps` | `id`, `title`, `experience_id`, `project_id`, `organization_id` | `step_title` | `project_id = '…'` |
|
|
101
|
-
| `experiences` | `id`, `title`, `project_id`, `organization_id` | `experience_title` | `project_id = '…'` |
|
|
102
|
-
| `projects` | `id`, `name`, `timezone`, `organization_id` | `project_name`, `project_timezone` | `id = '<project_id>'` |
|
|
103
|
-
|
|
104
|
-
When queried directly, use the real column names:
|
|
105
|
-
|
|
106
|
-
```sql
|
|
107
|
-
-- List all experiences for a project
|
|
108
|
-
SELECT id, title FROM experiences WHERE project_id = 'your-project-id'
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
When referenced from `events`, use the prefixed analyst names — joins are injected automatically:
|
|
112
|
-
|
|
113
|
-
```sql
|
|
114
|
-
SELECT experience_title, step_title, count(*)
|
|
115
|
-
FROM events
|
|
116
|
-
WHERE project_id = 'your-project-id'
|
|
117
|
-
GROUP BY experience_title, step_title
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## `features`
|
|
121
|
-
|
|
122
|
-
The `features` table gives you
|
|
123
|
-
[parameterized virtual functions](/reference/pickedql/virtual-functions#feature-functions-on-features-and-on-events).
|
|
124
|
-
Use them to read which visitors each feature flag holds:
|
|
125
|
-
|
|
126
|
-
| Function | Description |
|
|
127
|
-
|---|---|
|
|
128
|
-
| `feature_users('name', 'bucket' [, 'key'])` | Unique users in a feature bucket |
|
|
129
|
-
| `feature_sessions('name', 'bucket' [, 'key'])` | Unique sessions in a feature bucket |
|
|
130
|
-
| `feature_events('name', 'bucket' [, 'key'])` | Unique events in a feature bucket |
|
|
131
|
-
|
|
132
|
-
## `experience_journey`
|
|
133
|
-
|
|
134
|
-
This table gives one edge for each step transition, and PickedQL aggregates them
|
|
135
|
-
first. Use the edges in a sankey chart or a funnel chart. Give each parameter in the
|
|
136
|
-
outer `WHERE` clause. PickedQL reads them and puts them into the query below.
|
|
137
|
-
|
|
138
|
-
### Columns
|
|
139
|
-
|
|
140
|
-
| Column | Type | Description |
|
|
141
|
-
|---|---|---|
|
|
142
|
-
| `source` | `String` | Edge start, formatted as `NN. <step title>` (for example `001. Welcome screen`) |
|
|
143
|
-
| `target` | `String` | Edge end, formatted as `NN. <step title>`.
|
|
144
|
-
| `users` | `UInt64` | Distinct `user_canonical_id` count that traversed this edge. |
|
|
145
|
-
|
|
146
|
-
### Parameters, in the `WHERE` clause
|
|
147
|
-
|
|
148
|
-
| Key | Type | Required | Purpose |
|
|
149
|
-
|---|---|---|---|
|
|
150
|
-
| `project_id` | `String` | ✓ | The tenant filter. |
|
|
151
|
-
| `experience_id` | `String` | | Limits the rows to one `fact_events.experience_id`. |
|
|
152
|
-
| `starting_step` | `String` | | Anchors each edge at the first time that a user reaches this `step_id`. The default is the first step of each user. |
|
|
153
|
-
| `targeting_step` | `String` | | Trims the window of each user at the first time that the user reaches this `step_id`. A user who never reaches it still gives the journey up to that point. |
|
|
154
|
-
| `num_nodes_after_start` | Integer | | The forward window from the start. It keeps a step where `seq_pos < start_seq + N`. |
|
|
155
|
-
| `num_nodes_before_target` | Integer | | The backward window from the target. It keeps a step where `seq_pos >= target_seq - N`. It needs `targeting_step`. |
|
|
156
|
-
| `top_n_path` | Integer | | Keeps the paths that the most users take, and drops the rest. The default is no limit. |
|
|
157
|
-
| `user_cohort_event` | `String` | | Limits the rows to a user with at least one `fact_events` row of this `event_type`. PickedQL writes it as `user_canonical_id IN (SELECT DISTINCT user_canonical_id FROM fact_events WHERE event_type = '…')`. |
|
|
158
|
-
| `client_local_date` | `Date` | | A filter on a range of dates. PickedQL puts it into the read below. It takes `=`, `<`, `<=`, `>`, `>=`, and `BETWEEN`. |
|
|
159
|
-
| `event_timestamp` | `DateTime64` | | A filter on the timestamp from the server. It takes the same operators as `client_local_date`. |
|
|
160
|
-
|
|
161
|
-
When you set both window parameters, both tests apply, and the result is their
|
|
162
|
-
intersection. A date filter joins the other parameters with `AND`.
|
|
163
|
-
|
|
164
|
-
See
|
|
165
|
-
[data sources, `experience_journey`](/reference/pickedql/data-sources#experience_journey--step-transitions-for-a-sankey-chart)
|
|
166
|
-
for examples.
|
|
167
|
-
|
|
168
|
-
## Related
|
|
169
|
-
|
|
170
|
-
- [Data sources](/reference/pickedql/data-sources)
|
|
171
|
-
- [Dimensions](/reference/pickedql/dimensions)
|
|
172
|
-
- [About PickedQL](/explanation/how-pickedql-works)
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Virtual functions
|
|
7
|
-
|
|
8
|
-
A virtual function is a short form of an aggregate expression. Each one is
|
|
9
|
-
**table-aware**. The same function expands one way on `metrics`, where PickedQL
|
|
10
|
-
aggregates the data first. It expands another way on `events`, where there is one row
|
|
11
|
-
for each user.
|
|
12
|
-
|
|
13
|
-
## A/B test metrics
|
|
14
|
-
|
|
15
|
-
| Function | Description |
|
|
16
|
-
|---|---|
|
|
17
|
-
| `control_users([condition])` | The different users in the Control group. A condition of your own can narrow them. |
|
|
18
|
-
| `variant_users([condition])` | The different users in the Variant group. A condition of your own can narrow them. |
|
|
19
|
-
| `all_users()` | Every different user |
|
|
20
|
-
| `control_sessions([condition])` | The different sessions in the Control group. A condition of your own can narrow them. |
|
|
21
|
-
| `variant_sessions([condition])` | The different sessions in the Variant group. A condition of your own can narrow them. |
|
|
22
|
-
| `all_sessions()` | Every different session |
|
|
23
|
-
|
|
24
|
-
### Your own filters on `events`
|
|
25
|
-
|
|
26
|
-
On the `events` table, each `control_*` function and each `variant_*` function takes
|
|
27
|
-
**one optional filter argument**. The filter counts only a user or a session that
|
|
28
|
-
matches your expression. It applies together with the `variant_type` filter that
|
|
29
|
-
PickedQL adds. Give the argument in the first place, or by the name `filter=`.
|
|
30
|
-
|
|
31
|
-
The filter uses the same `column=value` syntax as a conversion-rate condition. It
|
|
32
|
-
takes the `AND` and `OR` operators, and parentheses can hold a set of terms.
|
|
33
|
-
|
|
34
|
-
```sql
|
|
35
|
-
-- The default: every Control user.
|
|
36
|
-
SELECT control_users() FROM events
|
|
37
|
-
|
|
38
|
-
-- Your own filter, in the first place.
|
|
39
|
-
SELECT control_users('event_type=app_initialize') FROM events
|
|
40
|
-
SELECT variant_users('event_type=app_initialize AND step_id=xxx') FROM events
|
|
41
|
-
|
|
42
|
-
-- The AND and OR operators, with parentheses.
|
|
43
|
-
SELECT control_users('event_type=app_initialize OR event_type=app_load') FROM events
|
|
44
|
-
SELECT control_users('event_type=form_submit AND (step_id=lead-capture OR step_id=xxx)') FROM events
|
|
45
|
-
|
|
46
|
-
-- Sessions
|
|
47
|
-
SELECT control_sessions('event_type=step_enter') FROM events
|
|
48
|
-
SELECT variant_sessions('event_type=step_enter AND step_id=checkout') FROM events
|
|
49
|
-
|
|
50
|
-
-- Named form
|
|
51
|
-
SELECT control_users(filter='event_type=app_initialize AND step_id=xxx') FROM events
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
:::note
|
|
55
|
-
A filter of your own is **not supported on `metrics`**, because PickedQL aggregates
|
|
56
|
-
that data first. On `metrics` these functions ignore every argument. They use the
|
|
57
|
-
default Control filter and Variant filter only.
|
|
58
|
-
:::
|
|
59
|
-
|
|
60
|
-
## Conversion metrics
|
|
61
|
-
|
|
62
|
-
| Function | Description |
|
|
63
|
-
|---|---|
|
|
64
|
-
| `all_purchase_users()` | Users who completed a purchase |
|
|
65
|
-
| `control_purchase_users()` | Control users who purchased (`metrics` only) |
|
|
66
|
-
| `variant_purchase_users()` | Variant users who purchased (`metrics` only) |
|
|
67
|
-
| `all_purchase_sessions()` | Sessions with a purchase (`metrics` only) |
|
|
68
|
-
| `all_purchase_orders()` | Unique order count (`metrics` only) |
|
|
69
|
-
| `all_cart_add_users()` | Users who added to cart |
|
|
70
|
-
|
|
71
|
-
## Conversion rates
|
|
72
|
-
|
|
73
|
-
| Function | Description |
|
|
74
|
-
|---|---|
|
|
75
|
-
| `control_conversion_rate([numerator [, denominator]])` | The conversion rate of the Control group. By default it divides the users with a purchase by all users. |
|
|
76
|
-
| `variant_conversion_rate([numerator [, denominator]])` | The conversion rate of the Variant group. It takes the same arguments. |
|
|
77
|
-
| `conversion_rate_uplift([numerator [, denominator]])` | The gain of the Variant over the Control: `(variant CR - control CR) / control CR`. It takes the same arguments. |
|
|
78
|
-
|
|
79
|
-
### Your own conditions on `events`
|
|
80
|
-
|
|
81
|
-
On the `events` table, each conversion-rate function takes up to **two optional
|
|
82
|
-
arguments**. They set the numerator and the denominator. Each argument is either a
|
|
83
|
-
**condition expression string** or a **nested virtual function call**. See below.
|
|
84
|
-
Give the arguments in order, or by the names `numerator=` and `denominator=`.
|
|
85
|
-
|
|
86
|
-
Each condition expression uses `column=value`, with the `AND` and `OR` operators.
|
|
87
|
-
Parentheses can hold a set of terms.
|
|
88
|
-
|
|
89
|
-
```sql
|
|
90
|
-
-- Default: purchase users / all users
|
|
91
|
-
SELECT control_conversion_rate() FROM events
|
|
92
|
-
|
|
93
|
-
-- Custom numerator, default denominator (all users)
|
|
94
|
-
SELECT control_conversion_rate('event_type=form_submit_success') FROM events
|
|
95
|
-
|
|
96
|
-
-- The AND and OR operators in a condition.
|
|
97
|
-
SELECT control_conversion_rate('event_type=checkout_complete OR event_type=order_create') FROM events
|
|
98
|
-
SELECT control_conversion_rate('step_id=lead-capture AND event_type=form_submit_success') FROM events
|
|
99
|
-
|
|
100
|
-
-- Parentheses hold a set of terms.
|
|
101
|
-
SELECT control_conversion_rate('event_type=form_submit AND (step_id=lead-capture OR step_id=xxx)') FROM events
|
|
102
|
-
|
|
103
|
-
-- Custom numerator AND denominator (positional)
|
|
104
|
-
SELECT control_conversion_rate('event_type=form_submit', 'step_id=lead-capture') FROM events
|
|
105
|
-
|
|
106
|
-
-- Named arguments (explicit, any order)
|
|
107
|
-
SELECT control_conversion_rate(numerator='event_type=form_submit', denominator='step_id=lead-capture') FROM events
|
|
108
|
-
|
|
109
|
-
-- Named: denominator only (numerator defaults to purchase)
|
|
110
|
-
SELECT control_conversion_rate(denominator='step_id=lead-capture') FROM events
|
|
111
|
-
|
|
112
|
-
-- The uplift, with the arguments given by name.
|
|
113
|
-
SELECT conversion_rate_uplift(numerator='event_type=form_submit', denominator='step_id=lead-capture') FROM events
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
#### A nested virtual function as the numerator or the denominator
|
|
117
|
-
|
|
118
|
-
You can pass a **virtual function call** as the numerator or the denominator, in
|
|
119
|
-
place of a condition string. PickedQL puts the inner aggregate there directly. It
|
|
120
|
-
adds no `variant_type` filter above it, because the nested function sets its own
|
|
121
|
-
filter.
|
|
122
|
-
|
|
123
|
-
This form is the most flexible one when the numerator and the denominator come from
|
|
124
|
-
different segments. An example is the Control users who fired one event, over **all**
|
|
125
|
-
users of every variant:
|
|
126
|
-
|
|
127
|
-
```sql
|
|
128
|
-
-- The Control users who fired `app_initialize`, over all users.
|
|
129
|
-
SELECT control_conversion_rate(
|
|
130
|
-
control_users('event_type=app_initialize'),
|
|
131
|
-
all_users()
|
|
132
|
-
) FROM events
|
|
133
|
-
|
|
134
|
-
-- Mix string and nested forms
|
|
135
|
-
SELECT control_conversion_rate(
|
|
136
|
-
'event_type=form_submit',
|
|
137
|
-
all_users()
|
|
138
|
-
) FROM events
|
|
139
|
-
|
|
140
|
-
-- The uplift, with a nested function in each place.
|
|
141
|
-
SELECT conversion_rate_uplift(
|
|
142
|
-
control_users('event_type=app_initialize'),
|
|
143
|
-
all_users()
|
|
144
|
-
) FROM events
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
:::note
|
|
148
|
-
A condition of your own, and a nested virtual function, are both **not supported on
|
|
149
|
-
`metrics`**, because PickedQL aggregates that data first. On `metrics` these
|
|
150
|
-
functions always divide the users with a purchase by all users.
|
|
151
|
-
:::
|
|
152
|
-
|
|
153
|
-
## Visitor segmentation (`metrics` only)
|
|
154
|
-
|
|
155
|
-
| Function | Description |
|
|
156
|
-
|---|---|
|
|
157
|
-
| `new_users()` | First-time visitors |
|
|
158
|
-
| `returning_users()` | Returning visitors |
|
|
159
|
-
| `new_sessions()` | Sessions from new visitors |
|
|
160
|
-
| `returning_sessions()` | Sessions from returning visitors |
|
|
161
|
-
|
|
162
|
-
## Funnel metrics (`events` only)
|
|
163
|
-
|
|
164
|
-
:::note
|
|
165
|
-
We add to the funnel metrics all the time. Read this page again for a new function.
|
|
166
|
-
:::
|
|
167
|
-
|
|
168
|
-
| Function | Description |
|
|
169
|
-
|---|---|
|
|
170
|
-
| `step_enter_users()` | Users who entered a funnel step |
|
|
171
|
-
| `step_enter_sessions()` | Sessions that entered a funnel step |
|
|
172
|
-
|
|
173
|
-
## Cohort filters (`events` only)
|
|
174
|
-
|
|
175
|
-
Each of these functions has the shape of a predicate. It writes a
|
|
176
|
-
`user_canonical_id IN (SELECT … FROM events …)` subquery. Put one in a `WHERE` clause
|
|
177
|
-
to limit any analysis to a user with at least one event that matches a condition of
|
|
178
|
-
your own.
|
|
179
|
-
|
|
180
|
-
| Function | Description |
|
|
181
|
-
|---|---|
|
|
182
|
-
| `user_cohort_filter('<condition>')` | Limits the query to a user with one or more `events` rows that match `<condition>` |
|
|
183
|
-
| `user_cohort_filter(filter='<condition>')` | The same, with the argument given by name |
|
|
184
|
-
|
|
185
|
-
`<condition>` uses the same short `column=value [AND\|OR …]` form as `control_users`
|
|
186
|
-
and `variant_users`.
|
|
187
|
-
|
|
188
|
-
```sql
|
|
189
|
-
-- Funnel scoped to users who eventually submitted lead capture
|
|
190
|
-
SELECT all_users(), all_purchase_users()
|
|
191
|
-
FROM events
|
|
192
|
-
WHERE project_id = 'proj-abc'
|
|
193
|
-
AND user_cohort_filter('event_type=lead_capture')
|
|
194
|
-
|
|
195
|
-
-- Multi-condition cohort with OR-grouping
|
|
196
|
-
SELECT all_sessions()
|
|
197
|
-
FROM events
|
|
198
|
-
WHERE project_id = 'proj-abc'
|
|
199
|
-
AND user_cohort_filter('event_type=signup OR event_type=trial_start')
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
The outer query MUST hold one `project_id` filter. The function puts that tenant into
|
|
203
|
-
the inner subquery. The read of the cohort therefore covers your project, and not the
|
|
204
|
-
whole warehouse.
|
|
205
|
-
|
|
206
|
-
## Feature functions, on `features` and on `events`
|
|
207
|
-
|
|
208
|
-
Parameterized functions that accept the feature name, bucket, and an optional feature key:
|
|
209
|
-
|
|
210
|
-
| Function | Description |
|
|
211
|
-
|---|---|
|
|
212
|
-
| `feature_users('name', 'bucket' [, 'key'])` | Unique users in a feature bucket |
|
|
213
|
-
| `feature_sessions('name', 'bucket' [, 'key'])` | Unique sessions in a feature bucket |
|
|
214
|
-
| `feature_events('name', 'bucket' [, 'key'])` | Unique events in a feature bucket |
|
|
215
|
-
|
|
216
|
-
The bucket is what the SDK sent to the site of the visitor. A Boolean feature flag gives
|
|
217
|
-
`'true'` or `'false'`. A Text feature flag gives the value of one variant, or `'false'` for
|
|
218
|
-
the control group. The key is the version of the feature flag, such as `'v1'`.
|
|
219
|
-
|
|
220
|
-
```sql
|
|
221
|
-
-- Compare the two buckets of a Boolean feature flag.
|
|
222
|
-
SELECT
|
|
223
|
-
feature_users('homepage_test', 'false') AS control,
|
|
224
|
-
feature_users('homepage_test', 'true') AS variant
|
|
225
|
-
FROM features
|
|
226
|
-
|
|
227
|
-
-- Compare the variants of a Text feature flag.
|
|
228
|
-
SELECT
|
|
229
|
-
feature_users('hero', 'false') AS control,
|
|
230
|
-
feature_users('hero', 'hero-a') AS hero_a,
|
|
231
|
-
feature_users('hero', 'hero-b') AS hero_b
|
|
232
|
-
FROM features
|
|
233
|
-
|
|
234
|
-
-- Count one version of the feature flag alone.
|
|
235
|
-
SELECT feature_users('homepage_test', 'false', 'v1') FROM features
|
|
236
|
-
```
|
|
237
|
-
|
|
238
|
-
## Other (`metrics` only)
|
|
239
|
-
|
|
240
|
-
| Function | Description |
|
|
241
|
-
|---|---|
|
|
242
|
-
| `event_count()` | Total event count (from pre-aggregation) |
|
|
243
|
-
|
|
244
|
-
## Related
|
|
245
|
-
|
|
246
|
-
- [Filters](/reference/pickedql/filtering) — the filter string a function takes.
|
|
247
|
-
- [Analytics queries](/how-to/analytics)
|
|
248
|
-
- [About PickedQL](/explanation/how-pickedql-works)
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
type: reference
|
|
3
|
-
layout: docs
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Actions
|
|
7
|
-
|
|
8
|
-
Register an action handler on the Picked client. The SDK then invokes the handler
|
|
9
|
-
when an experience flow reaches an action node.
|
|
10
|
-
|
|
11
|
-
## Outcome and branch
|
|
12
|
-
|
|
13
|
-
| Handler outcome | Branch the flow takes |
|
|
14
|
-
| --- | --- |
|
|
15
|
-
| Throws, or its promise rejects | `onFail` |
|
|
16
|
-
| Resolves to any value, and that includes `false` | `onSuccess` |
|
|
17
|
-
|
|
18
|
-
An action node can also carry one plain connection, with no success or failure branch. The
|
|
19
|
-
flow then continues through it on either outcome.
|
|
20
|
-
|
|
21
|
-
An action does not interrupt your visitor. The current step stays on the screen while an
|
|
22
|
-
async action runs.
|
|
23
|
-
|
|
24
|
-
## Related
|
|
25
|
-
|
|
26
|
-
- [How to register an action handler](/how-to/register-an-action-handler) — the handler,
|
|
27
|
-
and when to throw.
|
|
28
|
-
- [About how Picked works](/explanation/how-picked-works#how-an-action-decides-which-way-to-go)
|
|
29
|
-
— why a returned `false` is a success.
|
|
30
|
-
- [Actions](/reference/dashboard/actions) — the dashboard options.
|