Analytics events
The Picked SDK sends an analytics event for each action of a visitor. This page names every event type, every interaction type, and every schema that the SDK sends.
Two terms carry the page:
- An event type is the name of the event. It is the
event_typecolumn offact_eventsin Picked Analytics. - A context is a block of data that the SDK attaches to an event. Picked makes a
column from each one. An example is the
product_listcontext behinddim_product.
Every table below marks a context as always attached or as attached when available.
The SDK attaches a context in the second group only when it has the data at that moment.
An event outside an experience has no experience context.
Contexts on every event
The tracker attaches two contexts to every event: app, with the project ID, and
deployment, with the environment of the SDK. It also attaches cvly_x, but only for a
site on Vercel.
The tables below never list deployment or cvly_x. They list app only where the
tracker of that event attaches it a second time.
Event types
Experience events
The analytics plugin sends these events. They come from the client SDK, and they need no code of yours.
| Event type | When it fires | Always attached | Attached when available |
|---|---|---|---|
app_load | The SDK loads on the page. | feature_list, session | experience, step, workspace |
app_initialize | The SDK completes its start-up and is ready. | feature_list, session | experience, step, workspace |
experience_load | An experience starts. | experience, feature_list, session | step, workspace |
app_open | An experience opens. | feature_list, session | experience, step, workspace |
app_close | An experience closes. | feature_list, session | experience, step, workspace |
feature_decide | A feature flag gets its bucket for this visitor. | feature_list, session | experience, step, workspace |
An experience in an <ExperienceSlot> sends experience_load when the slot mounts it in
the browser. The slot shows the experience when it is open and when it is closed:
- With
open="rule", an experience that has noinitializeOpenvalue does not open. It sends noapp_open. - When the slot stops rendering an experience, the experience sends no
app_close.
See Slots and Placements.
Step and form events
The analytics plugin sends step_enter, step_submit, step_submit_success,
form_submit, form_submit_success, form_submit_error, and field_validation_error. The
SDK has a tracker for step_submit_error and step_complete, but it starts neither of
them. Call the tracker from your own code.
| Event type | When it fires | Always attached | Attached when available |
|---|---|---|---|
step_enter | The visitor arrives at a step of a flow. | feature_list, session, step | experience, field_list, workspace |
step_submit | The visitor submits a step. | feature_list, session, step | experience, field_list, response_list, workspace |
step_submit_success | The step submission is accepted. | feature_list, session, step | experience, field_list, response_list, workspace |
step_submit_error | A step submission fails. Your code sends it. | exception, feature_list, session, step | experience, field_list, response_list, workspace |
step_complete | A step reaches its end state. Your code sends it. | feature_list, session, step | experience, field_list, response_list, workspace |
form_submit | The visitor submits a form. | feature_list, form, session | experience, step, workspace |
form_submit_success | The form submission is accepted. | feature_list, form, session | experience, step, workspace |
form_submit_error | The form submission fails. The reason is in exception. | exception, feature_list, form, session | experience, step, workspace |
field_validation_error | A field value fails a validation rule. | exception, feature_list, session | experience, form, step, workspace |
Ecommerce events
Three sources send these events: the template for Google Tag Manager, the Picked app for Shopify, and your own code. The template for Google Tag Manager sends every event of this group. "Shopify behaviour" below covers the Picked app for Shopify.
| Event type | When it fires | Always attached | Attached when available |
|---|---|---|---|
cart_add | A product goes into the cart. | app, feature_list, product_list, session | experience, step, workspace |
cart_remove | A product leaves the cart. | app, feature_list, product_list, session | experience, step, workspace |
checkout_start | The visitor starts a checkout. | app, feature_list, product_list, session | experience, step, workspace |
checkout_complete | The visitor completes a checkout. | app, feature_list, order, product_list, session | experience, step, workspace |
order_create | An order becomes a record in the store. | app, feature_list, order, product_list, session | experience, step, workspace |
product_list_view | The visitor sees a list of products, such as a collection. | app, feature_list, product_list, session | experience, step, workspace |
product_select | The visitor chooses a product from a list. | feature_list, product_list, session | experience, step, workspace |
product_view_details | The visitor opens the detail page of a product. | app, feature_list, product_list, session | experience, step, workspace |
search_results_list_view | The visitor sees a list of search results. | feature_list, product_list, session | experience, step, workspace |
recommendation_present | A step shows a recommendation to the visitor. | feature_list, product_list, session | experience, step, workspace |
wishlist_add | A product goes onto a wishlist. | feature_list, product_list, session | experience, step, workspace |
waitlist_join | The visitor joins a waitlist. | app, feature_list, session | experience, product_list, step, workspace |
is_purchase is 1 for checkout_complete and 0 for every other event. is_cart_add is 1
for cart_add and 0 for every other event. Both are columns of fact_events in Picked
Analytics. That table has one row for each product item of an event, and one row for an event
with no product item. To count events, count the different event_id values.
Shopify behaviour
The Picked app for Shopify sends a part of this group from a web pixel, and one event from the server.
| Picked event | Shopify source |
|---|---|
cart_add | The product_added_to_cart pixel event. The product_list context holds the one cart line, and not the whole cart. |
cart_remove | The product_removed_from_cart pixel event, with the same one cart line. |
checkout_start | The checkout_started pixel event. The session context also gets shopify_checkout_token. |
checkout_complete | The checkout_completed pixel event. The order context is there only when the checkout has an order. |
order_create | The orders/create webhook, from the server and not the browser. The event time is the creation time of the order. |
product_list_view | The collection_viewed pixel event. |
product_view_details | The product_viewed pixel event, for one product variant. |
page_view | The page_viewed pixel event. |
identify | The picked:session pixel event. |
For a Shopify store, the session context also holds shopify_client_id,
shopify_customer_id, and shopify_checkout_token. The order context holds the Shopify
checkout_token and cart_token. The Shopify pixel sends no other event type of this page.
Page and visitor events
| Event type | When it fires | Always attached | Attached when available |
|---|---|---|---|
page_view | The visitor opens a page. | app, feature_list, session | experience, product_list, step, workspace |
identify | The Picked app for Shopify connects the Picked ID to the Shopify client ID. | app, session | experience, feature_list, step, workspace |
lead_capture | The visitor gives contact details. The template for Google Tag Manager or your own code sends it. The analytics plugin does not send it. | feature_list, session | experience, step, workspace |
lead_created | The Picked API records the lead from a capture, or from a GraphQL write that sets trackLeadCreatedEvent to true. | app, session | workspace |
lead_updated | The Picked API changes the responses of a lead from a later capture, or from a GraphQL write that sets trackLeadUpdatedEvent to true. | app, session | workspace |
modal_open | A modal opens. | feature_list, modal, session | experience, step, workspace |
modal_close | A modal closes. | feature_list, modal, session | experience, step, workspace |
The session context of a lead_created or lead_updated event holds the Picked ID of
the lead. It also holds the gaid, shopify_client_id, gclid and user_id of the lead. The
gaid is the client ID of Google Analytics, such as 111.222, and not the whole _ga cookie
value. The user_id is the userId that the GraphQL write gives, as given. To connect the lead
to the visits that the template for Google Tag Manager sends, give the same value as the
template sends. A lead that the Picked API creates without a Picked ID gets a new one.
Custom events
A custom event takes its name from you, and not from the list above. Its event_type is
the name that you give it, so a query for it uses that name.
Three routes send one:
- A
data-picked-<interaction>attribute on an element. An element withdata-picked-click="add_to_cart"sends anadd_to_cartevent on a click. - The
custommessage of the template for Google Tag Manager, with a name of your choice. - The Emit analytics event tool of a workflow. Refer to the workflow tools reference.
A custom event always carries app and session. It also carries element, exception,
experience, feature_list, field_list, form, modal, order, product_list,
response_list, and step when the data is available. An event from a workflow carries
app, session and workspace only.
Interaction types
An interaction event is a DOM event of the visitor. Its name is also an event_type value,
so a query for a click reads WHERE event_type = 'click'.
Element interactions
The SDK binds these listeners to an experience when the enableInteractionListeners option
of the analytics plugin names them. The option is off by default.
| Interaction type | When it fires | Always attached | Attached when available |
|---|---|---|---|
click | The visitor clicks an element. | element, feature_list, session | experience, step, workspace |
rapid_click | The visitor clicks the same element many times in a short period. | element, feature_list, session | experience, step, workspace |
right_click | The visitor opens the context menu on an element. | element, feature_list, session | experience, step, workspace |
copy | The visitor copies a selection. | feature_list, session | element, experience, step, workspace |
paste | The visitor copies text into a field. | feature_list, session | element, experience, step, workspace |
drag | The visitor drags an element. | feature_list, session | element, experience, step, workspace |
backspace | The visitor deletes a character in a field. | element, feature_list, session | experience, step, workspace |
scroll | The visitor scrolls. | feature_list, session | element, experience, step, workspace |
rapid_scroll | The visitor scrolls up and down fast. | feature_list, session | element, experience, step, workspace |
mouse_shake | The visitor moves the pointer fast from side to side. | feature_list, session | experience, step, workspace |
Page and network interactions
The SDK binds these listeners to the document when the enableDocumentListeners option of
the analytics plugin is true. The option is off by default.
| Interaction type | When it fires | Always attached | Attached when available |
|---|---|---|---|
page_visible | The page becomes visible, such as a return to the tab. | feature_list, session | experience, step, workspace |
page_hidden | The page stops to be visible. | feature_list, session | experience, step, workspace |
page_show | The browser shows the page, and also on a return from the cache. | feature_list, session | experience, step, workspace |
page_hide | The browser hides the page before the visitor goes to a different page. | feature_list, session | experience, step, workspace |
offline | The browser loses the network. | feature_list, session | experience, step, workspace |
online | The browser gets the network back. | feature_list, session | experience, step, workspace |
resize | The window changes size. | feature_list, session | experience, step, workspace |
unload | The browser closes the document. | feature_list, session | experience, step, workspace |
Interactions with no listener
The SDK declares these two types and sends none of them, because it binds no listener for them. A query on one of them gives an empty result set.
| Interaction type | When it fires | Always attached | Attached when available |
|---|---|---|---|
back | Nothing sends it. | feature_list, session | experience, step, workspace |
forward | Nothing sends it. | feature_list, session | experience, step, workspace |
Schemas
Each context has a schema. Every schema also accepts a meta object for data of your own,
and keeps a property that the schema does not name. The field tables below do not repeat
meta.
| Schema | What it describes |
|---|---|
answer_list | The responses of a visitor, under the earlier name of response_list. The SDK attaches response_list. |
app | The Picked project that the event belongs to. |
cvly_funnel | The version of a Convincely funnel. The SDK attaches it for no event. |
cvly_x | The Vercel deployment behind the site. |
deployment | The deployment and the environment of the SDK. |
element | The HTML element behind an interaction event. |
event | The event itself. It is not a context: it holds the event type and the event_meta column. |
exception | The reason for a failure or a validation error. |
experience | The experience that the visitor is in. |
feature_list | Each feature flag that resolved for the visitor, with the bucket of the visitor. |
field_list | The fields of the current step, with their options. |
form | The form behind a form event. |
modal | The modal behind a modal event. |
order | The order behind a purchase. |
picked | The SDK version. The SDK attaches it for no event. |
product_list | The products that the event is about. |
question_list | The fields of a step, under the earlier name of field_list. The SDK attaches field_list. |
recommendation_list | A list of recommended items. The SDK attaches it for no event. |
response_list | The response of the visitor to each field. |
session | The Picked ID, and each other identifier that Picked has for the visitor. |
step | The step of the flow that the visitor is on. |
workspace | The workspace that served the project configuration, with its published version. |
app
| Field | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | The project ID. |
deployment
| Field | Type | Required | Description |
|---|---|---|---|
env | string | Yes | The environment of the deployment. |
id | string or null | No | The deployment ID. |
sha | string or null | No | The Git hash of the deployment. |
host | string or null | No | The host of the deployment. |
cvly_x
| Field | Type | Required | Description |
|---|---|---|---|
vercel_deployment_id | string | Yes | The Vercel deployment ID. |
vercel_env | string | Yes | The Vercel environment. |
vercel_url | string | Yes | The URL of the Vercel deployment. |
git_commit_sha | string or null | No | The Git hash of the deployment. |
session
The session context describes the visitor, and not one visit. The schema has no required
field. A value is null until Picked has it.
| Field | Type | Required | Description |
|---|---|---|---|
id | string or null | No | The Picked ID of the visitor. The SDK makes one ID for each browser, and keeps it in browser storage across visits. It is Lead.pickedId in the Management API. |
is_user | boolean or null | No | The result of the client condition, which asks "Is this visitor eligible?". True when the visitor passes the condition, or when the client has no condition. False when the visitor fails it, and then the SDK starts no experience. The SDK keeps the last result in browser storage. |
gaid | string or null | No | The client ID from Google Analytics. |
shopify_client_id | string or null | No | The Shopify client ID. |
shopify_customer_id | string or null | No | The Shopify customer ID. |
shopify_checkout_token | string or null | No | The Shopify checkout token. |
fingerprintjs_visitor_id | string or null | No | The FingerprintJS visitor ID. |
user_id | string | No | The user ID that a GTM tag of the Picked Ecommerce template sent with this event. By default it is sha256: and the SHA-256 hash of <project ID>:<user ID>. It is not in the context when the event has no user ID. It is not the Picked ID. |
workspace
The SDK attaches the workspace context after it registers a project configuration. The
schema has no required field.
| Field | Type | Required | Description |
|---|---|---|---|
id | string or null | No | The workspace ID. |
version_id | string or null | No | The ID of the published workspace version. It is null in a preview, because a preview has no published version. |
status | string or null | No | The workspace status. A published configuration has the status live. |
experience
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The experience ID. |
title | string | Yes | The experience title. It is the title column of experiences in Picked Analytics. |
type | string or null | No | The experience type. |
key | string or null | No | The experience key. It stays the same in each workspace. |
step
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The step ID. It is the step_id column of fact_events in Picked Analytics. |
title | string | Yes | The step title. It is the title column of steps in Picked Analytics. |
key | string or null | No | The stable key of the step. It does not change between versions. |
feature_list
items is a list. Each item describes one feature flag that resolved for the visitor. In
Picked Analytics, the feature_items column of fact_events holds the list.
Two more columns of fact_events come from the visit, and not from the event. The
features column maps each ab_feature to its ab_bucket. The feature_keys column maps
each ab_feature to its ab_key.
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | One entry for each feature flag. |
items[].ab_feature | string | Yes | The ID of the feature flag. For a feature flag from the dashboard, it is the key of the feature flag. |
items[].ab_name | string | Yes | The name of the feature flag. |
items[].ab_key | string | Yes | The version key. For a feature flag from the dashboard, it is v and the version, such as v4. A feature flag in SDK code sends its own key. |
items[].ab_bucket | boolean or string | Yes | The bucket of the visitor. It is true or false, or the value of a variant of a Text feature flag. A feature flag in SDK code sends the value that its decide gives. |
field_list
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | One entry for each field of the step. |
items[].id | string | Yes | The field ID. |
items[].type | string | Yes | The field type. |
items[].label | string | Yes | The field label. |
items[].options | array or null | No | The options that the field gives. |
items[].options[].id | string | Yes | The option ID. |
items[].options[].label | string | Yes | The option label. |
items[].options[].value | string, number, boolean, object, array, or null | Yes | The value behind the option. |
response_list
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | One entry for each response to a field whose policies.trackValue is true. The SDK sends no response_list when no response has such a field. |
items[].field_id | string | Yes | The key of the field, and not the id of the field in field_list. |
items[].values | array | Yes | The values that the visitor gave. |
items[].values[].value | string, number, boolean, object, array, or null | Yes | One response value. |
form
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The form ID. |
title | string or null | No | The form title. |
modal
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The modal ID. |
title | string | Yes | The modal title. |
element
| Field | Type | Required | Description |
|---|---|---|---|
node_type | string | Yes | The HTML tag name in lower case. It is unknown when the event has no element. |
id | string or null | No | The id attribute of the element. |
text | string or null | No | The text content of the element, to 255 characters. |
label | string or null | No | The label of the element. It is the interaction_type column of fact_events in Picked Analytics. That column is empty when the event has no label. |
exception
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | The reason for the failure. |
product_list
items follows the item format of GA4 Enhanced Ecommerce, so a variable in Google Tag
Manager maps onto it directly. Every item field accepts null.
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | One entry for each product. |
title | string or null | No | The title of the list. |
items[].item_id | string or null | No | The product ID. dim_product in Picked Analytics does not keep it. |
items[].item_name | string or null | No | The product name. It is the product_name column of dim_product in Picked Analytics. dim_product keeps only an item that has a name. |
items[].item_brand | string or null | No | The brand. |
items[].item_category | string or null | No | The category. It is the product_category column of dim_product in Picked Analytics. item_category2 to item_category5 hold the deeper levels. |
items[].item_variant | string or null | No | The variant. |
items[].item_list_id | string or null | No | The ID of the list that the product came from. |
items[].item_list_name | string or null | No | The name of that list. |
items[].price | number or null | No | The price of one item. |
items[].quantity | number or null | No | The quantity. |
items[].discount | number or null | No | The discount on the item. |
items[].currency | string or null | No | The currency code. |
items[].coupon | string or null | No | The coupon code. |
items[].affiliation | string or null | No | The store behind the order. |
items[].index | number or null | No | The position of the product in the list. |
items[].location_id | string or null | No | The location of the store. |
items[].promotion_id | string or null | No | The promotion ID. |
items[].promotion_name | string or null | No | The promotion name. |
items[].creative_name | string or null | No | The creative name. |
items[].creative_slot | string or null | No | The creative slot. |
items[].in_stock | boolean or null | No | True when the product is in stock. |
order
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The order ID. It is the order_id column of fact_events in Picked Analytics. |
customer_id | string or null | No | The customer ID in the store. |
checkout_token | string or null | No | The checkout token in the store. |
cart_token | string or null | No | The cart token in the store. |
event
The event schema wraps every event, and it is not a context.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | The event type. It is the event_type column of fact_events in Picked Analytics. |
The meta object of this schema is the event_meta column of fact_events in Picked Analytics.
recommendation_list
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | The title of the list. |
items | array | Yes | One entry for each recommended item. |
items[].sku | string | Yes | The SKU of the item. |
items[].title | string | Yes | The title of the item. |
question_list
question_list is the earlier name of field_list, and it has the same shape. On an item
and on an option, title takes the place of label.
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | One entry for each question. |
items[].id | string | Yes | The question ID. |
items[].type | string | Yes | The question type. |
items[].title | string | Yes | The question title. |
items[].options | array or null | No | The options that the question gives. |
answer_list
answer_list is the earlier name of response_list, and it has the same shape.
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | One entry for each question with an answer. |
items[].question_id | string | Yes | The ID of the question. |
items[].values | array | Yes | The values that the visitor gave. |
items[].values[].value | string, number, boolean, object, array, or null | Yes | One answer value. |
cvly_funnel
| Field | Type | Required | Description |
|---|---|---|---|
version | string | Yes | The version of the funnel. |
picked
| Field | Type | Required | Description |
|---|---|---|---|
sdk_version | string | Yes | The version of the SDK. |
Related
- MCP server — the tools that query these events in Picked Analytics.
- Install the GTM template — how to send an ecommerce event from Google Tag Manager.
