Skip to content
LogoLogo

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_type column of fact_events in 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_list context behind dim_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 typeWhen it firesAlways attachedAttached when available
app_loadThe SDK loads on the page.feature_list, sessionexperience, step, workspace
app_initializeThe SDK completes its start-up and is ready.feature_list, sessionexperience, step, workspace
experience_loadAn experience starts.experience, feature_list, sessionstep, workspace
app_openAn experience opens.feature_list, sessionexperience, step, workspace
app_closeAn experience closes.feature_list, sessionexperience, step, workspace
feature_decideA feature flag gets its bucket for this visitor.feature_list, sessionexperience, 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 no initializeOpen value does not open. It sends no app_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 typeWhen it firesAlways attachedAttached when available
step_enterThe visitor arrives at a step of a flow.feature_list, session, stepexperience, field_list, workspace
step_submitThe visitor submits a step.feature_list, session, stepexperience, field_list, response_list, workspace
step_submit_successThe step submission is accepted.feature_list, session, stepexperience, field_list, response_list, workspace
step_submit_errorA step submission fails. Your code sends it.exception, feature_list, session, stepexperience, field_list, response_list, workspace
step_completeA step reaches its end state. Your code sends it.feature_list, session, stepexperience, field_list, response_list, workspace
form_submitThe visitor submits a form.feature_list, form, sessionexperience, step, workspace
form_submit_successThe form submission is accepted.feature_list, form, sessionexperience, step, workspace
form_submit_errorThe form submission fails. The reason is in exception.exception, feature_list, form, sessionexperience, step, workspace
field_validation_errorA field value fails a validation rule.exception, feature_list, sessionexperience, 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 typeWhen it firesAlways attachedAttached when available
cart_addA product goes into the cart.app, feature_list, product_list, sessionexperience, step, workspace
cart_removeA product leaves the cart.app, feature_list, product_list, sessionexperience, step, workspace
checkout_startThe visitor starts a checkout.app, feature_list, product_list, sessionexperience, step, workspace
checkout_completeThe visitor completes a checkout.app, feature_list, order, product_list, sessionexperience, step, workspace
order_createAn order becomes a record in the store.app, feature_list, order, product_list, sessionexperience, step, workspace
product_list_viewThe visitor sees a list of products, such as a collection.app, feature_list, product_list, sessionexperience, step, workspace
product_selectThe visitor chooses a product from a list.feature_list, product_list, sessionexperience, step, workspace
product_view_detailsThe visitor opens the detail page of a product.app, feature_list, product_list, sessionexperience, step, workspace
search_results_list_viewThe visitor sees a list of search results.feature_list, product_list, sessionexperience, step, workspace
recommendation_presentA step shows a recommendation to the visitor.feature_list, product_list, sessionexperience, step, workspace
wishlist_addA product goes onto a wishlist.feature_list, product_list, sessionexperience, step, workspace
waitlist_joinThe visitor joins a waitlist.app, feature_list, sessionexperience, 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 eventShopify source
cart_addThe product_added_to_cart pixel event. The product_list context holds the one cart line, and not the whole cart.
cart_removeThe product_removed_from_cart pixel event, with the same one cart line.
checkout_startThe checkout_started pixel event. The session context also gets shopify_checkout_token.
checkout_completeThe checkout_completed pixel event. The order context is there only when the checkout has an order.
order_createThe orders/create webhook, from the server and not the browser. The event time is the creation time of the order.
product_list_viewThe collection_viewed pixel event.
product_view_detailsThe product_viewed pixel event, for one product variant.
page_viewThe page_viewed pixel event.
identifyThe 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 typeWhen it firesAlways attachedAttached when available
page_viewThe visitor opens a page.app, feature_list, sessionexperience, product_list, step, workspace
identifyThe Picked app for Shopify connects the Picked ID to the Shopify client ID.app, sessionexperience, feature_list, step, workspace
lead_captureThe 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, sessionexperience, step, workspace
lead_createdThe Picked API records the lead from a capture, or from a GraphQL write that sets trackLeadCreatedEvent to true.app, sessionworkspace
lead_updatedThe Picked API changes the responses of a lead from a later capture, or from a GraphQL write that sets trackLeadUpdatedEvent to true.app, sessionworkspace
modal_openA modal opens.feature_list, modal, sessionexperience, step, workspace
modal_closeA modal closes.feature_list, modal, sessionexperience, 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 with data-picked-click="add_to_cart" sends an add_to_cart event on a click.
  • The custom message 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 typeWhen it firesAlways attachedAttached when available
clickThe visitor clicks an element.element, feature_list, sessionexperience, step, workspace
rapid_clickThe visitor clicks the same element many times in a short period.element, feature_list, sessionexperience, step, workspace
right_clickThe visitor opens the context menu on an element.element, feature_list, sessionexperience, step, workspace
copyThe visitor copies a selection.feature_list, sessionelement, experience, step, workspace
pasteThe visitor copies text into a field.feature_list, sessionelement, experience, step, workspace
dragThe visitor drags an element.feature_list, sessionelement, experience, step, workspace
backspaceThe visitor deletes a character in a field.element, feature_list, sessionexperience, step, workspace
scrollThe visitor scrolls.feature_list, sessionelement, experience, step, workspace
rapid_scrollThe visitor scrolls up and down fast.feature_list, sessionelement, experience, step, workspace
mouse_shakeThe visitor moves the pointer fast from side to side.feature_list, sessionexperience, 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 typeWhen it firesAlways attachedAttached when available
page_visibleThe page becomes visible, such as a return to the tab.feature_list, sessionexperience, step, workspace
page_hiddenThe page stops to be visible.feature_list, sessionexperience, step, workspace
page_showThe browser shows the page, and also on a return from the cache.feature_list, sessionexperience, step, workspace
page_hideThe browser hides the page before the visitor goes to a different page.feature_list, sessionexperience, step, workspace
offlineThe browser loses the network.feature_list, sessionexperience, step, workspace
onlineThe browser gets the network back.feature_list, sessionexperience, step, workspace
resizeThe window changes size.feature_list, sessionexperience, step, workspace
unloadThe browser closes the document.feature_list, sessionexperience, 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 typeWhen it firesAlways attachedAttached when available
backNothing sends it.feature_list, sessionexperience, step, workspace
forwardNothing sends it.feature_list, sessionexperience, 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.

SchemaWhat it describes
answer_listThe responses of a visitor, under the earlier name of response_list. The SDK attaches response_list.
appThe Picked project that the event belongs to.
cvly_funnelThe version of a Convincely funnel. The SDK attaches it for no event.
cvly_xThe Vercel deployment behind the site.
deploymentThe deployment and the environment of the SDK.
elementThe HTML element behind an interaction event.
eventThe event itself. It is not a context: it holds the event type and the event_meta column.
exceptionThe reason for a failure or a validation error.
experienceThe experience that the visitor is in.
feature_listEach feature flag that resolved for the visitor, with the bucket of the visitor.
field_listThe fields of the current step, with their options.
formThe form behind a form event.
modalThe modal behind a modal event.
orderThe order behind a purchase.
pickedThe SDK version. The SDK attaches it for no event.
product_listThe products that the event is about.
question_listThe fields of a step, under the earlier name of field_list. The SDK attaches field_list.
recommendation_listA list of recommended items. The SDK attaches it for no event.
response_listThe response of the visitor to each field.
sessionThe Picked ID, and each other identifier that Picked has for the visitor.
stepThe step of the flow that the visitor is on.
workspaceThe workspace that served the project configuration, with its published version.

app

FieldTypeRequiredDescription
project_idstringYesThe project ID.

deployment

FieldTypeRequiredDescription
envstringYesThe environment of the deployment.
idstring or nullNoThe deployment ID.
shastring or nullNoThe Git hash of the deployment.
hoststring or nullNoThe host of the deployment.

cvly_x

FieldTypeRequiredDescription
vercel_deployment_idstringYesThe Vercel deployment ID.
vercel_envstringYesThe Vercel environment.
vercel_urlstringYesThe URL of the Vercel deployment.
git_commit_shastring or nullNoThe 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.

FieldTypeRequiredDescription
idstring or nullNoThe 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_userboolean or nullNoThe 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.
gaidstring or nullNoThe client ID from Google Analytics.
shopify_client_idstring or nullNoThe Shopify client ID.
shopify_customer_idstring or nullNoThe Shopify customer ID.
shopify_checkout_tokenstring or nullNoThe Shopify checkout token.
fingerprintjs_visitor_idstring or nullNoThe FingerprintJS visitor ID.
user_idstringNoThe 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.

FieldTypeRequiredDescription
idstring or nullNoThe workspace ID.
version_idstring or nullNoThe ID of the published workspace version. It is null in a preview, because a preview has no published version.
statusstring or nullNoThe workspace status. A published configuration has the status live.

experience

FieldTypeRequiredDescription
idstringYesThe experience ID.
titlestringYesThe experience title. It is the title column of experiences in Picked Analytics.
typestring or nullNoThe experience type.
keystring or nullNoThe experience key. It stays the same in each workspace.

step

FieldTypeRequiredDescription
idstringYesThe step ID. It is the step_id column of fact_events in Picked Analytics.
titlestringYesThe step title. It is the title column of steps in Picked Analytics.
keystring or nullNoThe 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.

FieldTypeRequiredDescription
itemsarrayYesOne entry for each feature flag.
items[].ab_featurestringYesThe ID of the feature flag. For a feature flag from the dashboard, it is the key of the feature flag.
items[].ab_namestringYesThe name of the feature flag.
items[].ab_keystringYesThe 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_bucketboolean or stringYesThe 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

FieldTypeRequiredDescription
itemsarrayYesOne entry for each field of the step.
items[].idstringYesThe field ID.
items[].typestringYesThe field type.
items[].labelstringYesThe field label.
items[].optionsarray or nullNoThe options that the field gives.
items[].options[].idstringYesThe option ID.
items[].options[].labelstringYesThe option label.
items[].options[].valuestring, number, boolean, object, array, or nullYesThe value behind the option.

response_list

FieldTypeRequiredDescription
itemsarrayYesOne 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_idstringYesThe key of the field, and not the id of the field in field_list.
items[].valuesarrayYesThe values that the visitor gave.
items[].values[].valuestring, number, boolean, object, array, or nullYesOne response value.

form

FieldTypeRequiredDescription
idstringYesThe form ID.
titlestring or nullNoThe form title.
FieldTypeRequiredDescription
idstringYesThe modal ID.
titlestringYesThe modal title.

element

FieldTypeRequiredDescription
node_typestringYesThe HTML tag name in lower case. It is unknown when the event has no element.
idstring or nullNoThe id attribute of the element.
textstring or nullNoThe text content of the element, to 255 characters.
labelstring or nullNoThe 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

FieldTypeRequiredDescription
reasonstringYesThe 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.

FieldTypeRequiredDescription
itemsarrayYesOne entry for each product.
titlestring or nullNoThe title of the list.
items[].item_idstring or nullNoThe product ID. dim_product in Picked Analytics does not keep it.
items[].item_namestring or nullNoThe 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_brandstring or nullNoThe brand.
items[].item_categorystring or nullNoThe category. It is the product_category column of dim_product in Picked Analytics. item_category2 to item_category5 hold the deeper levels.
items[].item_variantstring or nullNoThe variant.
items[].item_list_idstring or nullNoThe ID of the list that the product came from.
items[].item_list_namestring or nullNoThe name of that list.
items[].pricenumber or nullNoThe price of one item.
items[].quantitynumber or nullNoThe quantity.
items[].discountnumber or nullNoThe discount on the item.
items[].currencystring or nullNoThe currency code.
items[].couponstring or nullNoThe coupon code.
items[].affiliationstring or nullNoThe store behind the order.
items[].indexnumber or nullNoThe position of the product in the list.
items[].location_idstring or nullNoThe location of the store.
items[].promotion_idstring or nullNoThe promotion ID.
items[].promotion_namestring or nullNoThe promotion name.
items[].creative_namestring or nullNoThe creative name.
items[].creative_slotstring or nullNoThe creative slot.
items[].in_stockboolean or nullNoTrue when the product is in stock.

order

FieldTypeRequiredDescription
idstringYesThe order ID. It is the order_id column of fact_events in Picked Analytics.
customer_idstring or nullNoThe customer ID in the store.
checkout_tokenstring or nullNoThe checkout token in the store.
cart_tokenstring or nullNoThe cart token in the store.

event

The event schema wraps every event, and it is not a context.

FieldTypeRequiredDescription
typestringYesThe 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

FieldTypeRequiredDescription
titlestringYesThe title of the list.
itemsarrayYesOne entry for each recommended item.
items[].skustringYesThe SKU of the item.
items[].titlestringYesThe 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.

FieldTypeRequiredDescription
itemsarrayYesOne entry for each question.
items[].idstringYesThe question ID.
items[].typestringYesThe question type.
items[].titlestringYesThe question title.
items[].optionsarray or nullNoThe options that the question gives.

answer_list

answer_list is the earlier name of response_list, and it has the same shape.

FieldTypeRequiredDescription
itemsarrayYesOne entry for each question with an answer.
items[].question_idstringYesThe ID of the question.
items[].valuesarrayYesThe values that the visitor gave.
items[].values[].valuestring, number, boolean, object, array, or nullYesOne answer value.

cvly_funnel

FieldTypeRequiredDescription
versionstringYesThe version of the funnel.

picked

FieldTypeRequiredDescription
sdk_versionstringYesThe version of the SDK.