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 in PickedQL.
  • 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
app_initializeThe SDK completes its start-up and is ready.feature_list, sessionexperience, step
experience_loadAn experience starts.experience, feature_list, sessionstep
app_openAn experience opens.feature_list, sessionexperience, step
app_closeAn experience closes.feature_list, sessionexperience, step
feature_decideA feature flag gets its bucket for this visitor.feature_list, sessionexperience, step

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
step_submitThe visitor submits a step.feature_list, session, stepexperience, field_list, response_list
step_submit_successThe step submission is accepted.feature_list, session, stepexperience, field_list, response_list
step_submit_errorA step submission fails. Your code sends it.exception, feature_list, session, stepexperience, field_list, response_list
step_completeA step reaches its end state. Your code sends it.feature_list, session, stepexperience, field_list, response_list
form_submitThe visitor submits a form.feature_list, form, sessionexperience, step
form_submit_successThe form submission is accepted.feature_list, form, sessionexperience, step
form_submit_errorThe form submission fails. The reason is in exception.exception, feature_list, form, sessionexperience, step
field_validation_errorA field value fails a validation rule.exception, feature_list, sessionexperience, form, step

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
cart_removeA product leaves the cart.app, feature_list, product_list, sessionexperience, step
checkout_startThe visitor starts a checkout.app, feature_list, product_list, sessionexperience, step
checkout_completeThe visitor completes a checkout. It is the default conversion of PickedQL.app, feature_list, order, product_list, sessionexperience, step
order_createAn order becomes a record in the store.app, feature_list, order, product_list, sessionexperience, step
product_list_viewThe visitor sees a list of products, such as a collection.app, feature_list, product_list, sessionexperience, step
product_selectThe visitor chooses a product from a list.feature_list, product_list, sessionexperience, step
product_view_detailsThe visitor opens the detail page of a product.app, feature_list, product_list, sessionexperience, step
search_results_list_viewThe visitor sees a list of search results.feature_list, product_list, sessionexperience, step
recommendation_presentA step shows a recommendation to the visitor.feature_list, product_list, sessionexperience, step
wishlist_addA product goes onto a wishlist.feature_list, product_list, sessionexperience, step
waitlist_joinThe visitor joins a waitlist.app, feature_list, sessionexperience, product_list, step

is_purchase is 1 for checkout_complete and 0 for every other event. is_cart_add is 1 for cart_add. Both columns are on events and on metrics.

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 session events

Event typeWhen it firesAlways attachedAttached when available
page_viewThe visitor opens a page.app, feature_list, sessionexperience, product_list, step
identifyThe SDK connects the session to a known person or store client.app, sessionexperience, feature_list, step
lead_captureThe visitor gives contact details.feature_list, sessionexperience, step
lead_createdThe Picked API records the lead from a capture.app, sessionNone.
modal_openA modal opens.feature_list, modal, sessionexperience, step
modal_closeA modal closes.feature_list, modal, sessionexperience, step

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.

Two 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.

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.

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
rapid_clickThe visitor clicks the same element many times in a short period.element, feature_list, sessionexperience, step
right_clickThe visitor opens the context menu on an element.element, feature_list, sessionexperience, step
copyThe visitor copies a selection.feature_list, sessionelement, experience, step
pasteThe visitor copies text into a field.feature_list, sessionelement, experience, step
dragThe visitor drags an element.feature_list, sessionelement, experience, step
backspaceThe visitor deletes a character in a field.element, feature_list, sessionexperience, step
scrollThe visitor scrolls.feature_list, sessionelement, experience, step
rapid_scrollThe visitor scrolls up and down fast.feature_list, sessionelement, experience, step
mouse_shakeThe visitor moves the pointer fast from side to side.feature_list, sessionexperience, step

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
page_hiddenThe page stops to be visible.feature_list, sessionexperience, step
page_showThe browser shows the page, and also on a return from the cache.feature_list, sessionexperience, step
page_hideThe browser hides the page before the visitor goes to a different page.feature_list, sessionexperience, step
offlineThe browser loses the network.feature_list, sessionexperience, step
onlineThe browser gets the network back.feature_list, sessionexperience, step
resizeThe window changes size.feature_list, sessionexperience, step
unloadThe browser closes the document.feature_list, sessionexperience, step

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
forwardNothing sends it.feature_list, sessionexperience, step

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 of the session, 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 session, and each identifier that Picked has for it.
stepThe step of the flow that the visitor is on.

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 schema has no required field. A value is null until Picked has it.

FieldTypeRequiredDescription
idstring or nullNoThe session ID.
is_userboolean or nullNoTrue when Picked attributes the session to a known user.
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.

experience

FieldTypeRequiredDescription
idstringYesThe experience ID.
titlestringYesThe experience title. It is experience_title in PickedQL.
typestring or nullNoThe experience type.

step

FieldTypeRequiredDescription
idstringYesThe step ID. It is step_id in PickedQL.
titlestringYesThe step title. It is step_title in PickedQL.
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 of the session.

FieldTypeRequiredDescription
itemsarrayYesOne entry for each feature flag.
items[].ab_featurestringYesThe feature ID.
items[].ab_namestringYesThe feature name. It is ab_feature_name in PickedQL.
items[].ab_keystringYesThe feature key.
items[].ab_bucketboolean or stringYesThe bucket of the visitor. It is ab_feature_value in PickedQL.

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 field with a response.
items[].field_idstringYesThe ID of the field.
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 source of interaction_type in PickedQL.

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. It is product_name in dim_product together with the name.
items[].item_namestring or nullNoThe product name.
items[].item_brandstring or nullNoThe brand.
items[].item_categorystring or nullNoThe category. 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 order_id in PickedQL.
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 event_type in PickedQL.

The meta object of this schema is the event_meta column in PickedQL.

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.