picked 0.0.116-next.2 → 0.0.116-next.4

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.
@@ -39,14 +39,14 @@ tracker of that event attaches it a second time.
39
39
  The analytics plugin sends these events. They come from the client SDK, and they need no
40
40
  code of yours.
41
41
 
42
- | Event type | When it fires | Always attached | Attached when available |
43
- | --- | --- | --- | --- |
44
- | `app_load` | The SDK loads on the page. | `feature_list`, `session` | `experience`, `step` |
45
- | `app_initialize` | The SDK completes its start-up and is ready. | `feature_list`, `session` | `experience`, `step` |
46
- | `experience_load` | An experience starts. | `experience`, `feature_list`, `session` | `step` |
47
- | `app_open` | An experience opens. | `feature_list`, `session` | `experience`, `step` |
48
- | `app_close` | An experience closes. | `feature_list`, `session` | `experience`, `step` |
49
- | `feature_decide` | A feature flag gets its bucket for this visitor. | `feature_list`, `session` | `experience`, `step` |
42
+ | Event type | When it fires | Always attached | Attached when available |
43
+ | ----------------- | ------------------------------------------------ | --------------------------------------- | --------------------------------- |
44
+ | `app_load` | The SDK loads on the page. | `feature_list`, `session` | `experience`, `step`, `workspace` |
45
+ | `app_initialize` | The SDK completes its start-up and is ready. | `feature_list`, `session` | `experience`, `step`, `workspace` |
46
+ | `experience_load` | An experience starts. | `experience`, `feature_list`, `session` | `step`, `workspace` |
47
+ | `app_open` | An experience opens. | `feature_list`, `session` | `experience`, `step`, `workspace` |
48
+ | `app_close` | An experience closes. | `feature_list`, `session` | `experience`, `step`, `workspace` |
49
+ | `feature_decide` | A feature flag gets its bucket for this visitor. | `feature_list`, `session` | `experience`, `step`, `workspace` |
50
50
 
51
51
  An experience in an `<ExperienceSlot>` sends `experience_load` when the slot mounts it in
52
52
  the browser. The slot shows the experience when it is open and when it is closed:
@@ -64,17 +64,17 @@ The analytics plugin sends `step_enter`, `step_submit`, `step_submit_success`,
64
64
  SDK has a tracker for `step_submit_error` and `step_complete`, but it starts neither of
65
65
  them. Call the tracker from your own code.
66
66
 
67
- | Event type | When it fires | Always attached | Attached when available |
68
- | --- | --- | --- | --- |
69
- | `step_enter` | The visitor arrives at a step of a flow. | `feature_list`, `session`, `step` | `experience`, `field_list` |
70
- | `step_submit` | The visitor submits a step. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
71
- | `step_submit_success` | The step submission is accepted. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
72
- | `step_submit_error` | A step submission fails. Your code sends it. | `exception`, `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
73
- | `step_complete` | A step reaches its end state. Your code sends it. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list` |
74
- | `form_submit` | The visitor submits a form. | `feature_list`, `form`, `session` | `experience`, `step` |
75
- | `form_submit_success` | The form submission is accepted. | `feature_list`, `form`, `session` | `experience`, `step` |
76
- | `form_submit_error` | The form submission fails. The reason is in `exception`. | `exception`, `feature_list`, `form`, `session` | `experience`, `step` |
77
- | `field_validation_error` | A field value fails a validation rule. | `exception`, `feature_list`, `session` | `experience`, `form`, `step` |
67
+ | Event type | When it fires | Always attached | Attached when available |
68
+ | ------------------------ | -------------------------------------------------------- | ---------------------------------------------- | -------------------------------------------------------- |
69
+ | `step_enter` | The visitor arrives at a step of a flow. | `feature_list`, `session`, `step` | `experience`, `field_list`, `workspace` |
70
+ | `step_submit` | The visitor submits a step. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list`, `workspace` |
71
+ | `step_submit_success` | The step submission is accepted. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list`, `workspace` |
72
+ | `step_submit_error` | A step submission fails. Your code sends it. | `exception`, `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list`, `workspace` |
73
+ | `step_complete` | A step reaches its end state. Your code sends it. | `feature_list`, `session`, `step` | `experience`, `field_list`, `response_list`, `workspace` |
74
+ | `form_submit` | The visitor submits a form. | `feature_list`, `form`, `session` | `experience`, `step`, `workspace` |
75
+ | `form_submit_success` | The form submission is accepted. | `feature_list`, `form`, `session` | `experience`, `step`, `workspace` |
76
+ | `form_submit_error` | The form submission fails. The reason is in `exception`. | `exception`, `feature_list`, `form`, `session` | `experience`, `step`, `workspace` |
77
+ | `field_validation_error` | A field value fails a validation rule. | `exception`, `feature_list`, `session` | `experience`, `form`, `step`, `workspace` |
78
78
 
79
79
  ### Ecommerce events
80
80
 
@@ -82,20 +82,20 @@ Three sources send these events: the template for Google Tag Manager, the Picked
82
82
  Shopify, and your own code. The template for Google Tag Manager sends every event of this
83
83
  group. "Shopify behaviour" below covers the Picked app for Shopify.
84
84
 
85
- | Event type | When it fires | Always attached | Attached when available |
86
- | --- | --- | --- | --- |
87
- | `cart_add` | A product goes into the cart. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
88
- | `cart_remove` | A product leaves the cart. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
89
- | `checkout_start` | The visitor starts a checkout. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
90
- | `checkout_complete` | The visitor completes a checkout. | `app`, `feature_list`, `order`, `product_list`, `session` | `experience`, `step` |
91
- | `order_create` | An order becomes a record in the store. | `app`, `feature_list`, `order`, `product_list`, `session` | `experience`, `step` |
92
- | `product_list_view` | The visitor sees a list of products, such as a collection. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
93
- | `product_select` | The visitor chooses a product from a list. | `feature_list`, `product_list`, `session` | `experience`, `step` |
94
- | `product_view_details` | The visitor opens the detail page of a product. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step` |
95
- | `search_results_list_view` | The visitor sees a list of search results. | `feature_list`, `product_list`, `session` | `experience`, `step` |
96
- | `recommendation_present` | A step shows a recommendation to the visitor. | `feature_list`, `product_list`, `session` | `experience`, `step` |
97
- | `wishlist_add` | A product goes onto a wishlist. | `feature_list`, `product_list`, `session` | `experience`, `step` |
98
- | `waitlist_join` | The visitor joins a waitlist. | `app`, `feature_list`, `session` | `experience`, `product_list`, `step` |
85
+ | Event type | When it fires | Always attached | Attached when available |
86
+ | -------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------- |
87
+ | `cart_add` | A product goes into the cart. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
88
+ | `cart_remove` | A product leaves the cart. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
89
+ | `checkout_start` | The visitor starts a checkout. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
90
+ | `checkout_complete` | The visitor completes a checkout. | `app`, `feature_list`, `order`, `product_list`, `session` | `experience`, `step`, `workspace` |
91
+ | `order_create` | An order becomes a record in the store. | `app`, `feature_list`, `order`, `product_list`, `session` | `experience`, `step`, `workspace` |
92
+ | `product_list_view` | The visitor sees a list of products, such as a collection. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
93
+ | `product_select` | The visitor chooses a product from a list. | `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
94
+ | `product_view_details` | The visitor opens the detail page of a product. | `app`, `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
95
+ | `search_results_list_view` | The visitor sees a list of search results. | `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
96
+ | `recommendation_present` | A step shows a recommendation to the visitor. | `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
97
+ | `wishlist_add` | A product goes onto a wishlist. | `feature_list`, `product_list`, `session` | `experience`, `step`, `workspace` |
98
+ | `waitlist_join` | The visitor joins a waitlist. | `app`, `feature_list`, `session` | `experience`, `product_list`, `step`, `workspace` |
99
99
 
100
100
  `is_purchase` is 1 for `checkout_complete` and 0 for every other event. `is_cart_add` is 1
101
101
  for `cart_add` and 0 for every other event. Both are columns of `fact_events` in Picked
@@ -107,17 +107,17 @@ with no product item. To count events, count the different `event_id` values.
107
107
  The Picked app for Shopify sends a part of this group from a web pixel, and one event from
108
108
  the server.
109
109
 
110
- | Picked event | Shopify source |
111
- | --- | --- |
112
- | `cart_add` | The `product_added_to_cart` pixel event. The `product_list` context holds the one cart line, and not the whole cart. |
113
- | `cart_remove` | The `product_removed_from_cart` pixel event, with the same one cart line. |
114
- | `checkout_start` | The `checkout_started` pixel event. The `session` context also gets `shopify_checkout_token`. |
115
- | `checkout_complete` | The `checkout_completed` pixel event. The `order` context is there only when the checkout has an order. |
116
- | `order_create` | The `orders/create` webhook, from the server and not the browser. The event time is the creation time of the order. |
117
- | `product_list_view` | The `collection_viewed` pixel event. |
118
- | `product_view_details` | The `product_viewed` pixel event, for one product variant. |
119
- | `page_view` | The `page_viewed` pixel event. |
120
- | `identify` | The `picked:session` pixel event. |
110
+ | Picked event | Shopify source |
111
+ | ---------------------- | -------------------------------------------------------------------------------------------------------------------- |
112
+ | `cart_add` | The `product_added_to_cart` pixel event. The `product_list` context holds the one cart line, and not the whole cart. |
113
+ | `cart_remove` | The `product_removed_from_cart` pixel event, with the same one cart line. |
114
+ | `checkout_start` | The `checkout_started` pixel event. The `session` context also gets `shopify_checkout_token`. |
115
+ | `checkout_complete` | The `checkout_completed` pixel event. The `order` context is there only when the checkout has an order. |
116
+ | `order_create` | The `orders/create` webhook, from the server and not the browser. The event time is the creation time of the order. |
117
+ | `product_list_view` | The `collection_viewed` pixel event. |
118
+ | `product_view_details` | The `product_viewed` pixel event, for one product variant. |
119
+ | `page_view` | The `page_viewed` pixel event. |
120
+ | `identify` | The `picked:session` pixel event. |
121
121
 
122
122
  For a Shopify store, the `session` context also holds `shopify_client_id`,
123
123
  `shopify_customer_id`, and `shopify_checkout_token`. The `order` context holds the Shopify
@@ -125,15 +125,15 @@ For a Shopify store, the `session` context also holds `shopify_client_id`,
125
125
 
126
126
  ### Page and visitor events
127
127
 
128
- | Event type | When it fires | Always attached | Attached when available |
129
- | --- | --- | --- | --- |
130
- | `page_view` | The visitor opens a page. | `app`, `feature_list`, `session` | `experience`, `product_list`, `step` |
131
- | `identify` | The Picked app for Shopify connects the visitor ID to the Shopify client ID. | `app`, `session` | `experience`, `feature_list`, `step` |
132
- | `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` |
133
- | `lead_created` | The Picked API records the lead from a capture. | `app`, `session` | None. |
134
- | `lead_updated` | The Picked API changes the responses of a lead from a later capture. | `app`, `session` | None. |
135
- | `modal_open` | A modal opens. | `feature_list`, `modal`, `session` | `experience`, `step` |
136
- | `modal_close` | A modal closes. | `feature_list`, `modal`, `session` | `experience`, `step` |
128
+ | Event type | When it fires | Always attached | Attached when available |
129
+ | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------- |
130
+ | `page_view` | The visitor opens a page. | `app`, `feature_list`, `session` | `experience`, `product_list`, `step`, `workspace` |
131
+ | `identify` | The Picked app for Shopify connects the visitor ID to the Shopify client ID. | `app`, `session` | `experience`, `feature_list`, `step`, `workspace` |
132
+ | `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` |
133
+ | `lead_created` | The Picked API records the lead from a capture. | `app`, `session` | `workspace` |
134
+ | `lead_updated` | The Picked API changes the responses of a lead from a later capture. | `app`, `session` | `workspace` |
135
+ | `modal_open` | A modal opens. | `feature_list`, `modal`, `session` | `experience`, `step`, `workspace` |
136
+ | `modal_close` | A modal closes. | `feature_list`, `modal`, `session` | `experience`, `step`, `workspace` |
137
137
 
138
138
  ## Custom events
139
139
 
@@ -167,44 +167,44 @@ so a query for a click reads `WHERE event_type = 'click'`.
167
167
  The SDK binds these listeners to an experience when the `enableInteractionListeners` option
168
168
  of the analytics plugin names them. The option is off by default.
169
169
 
170
- | Interaction type | When it fires | Always attached | Attached when available |
171
- | --- | --- | --- | --- |
172
- | `click` | The visitor clicks an element. | `element`, `feature_list`, `session` | `experience`, `step` |
173
- | `rapid_click` | The visitor clicks the same element many times in a short period. | `element`, `feature_list`, `session` | `experience`, `step` |
174
- | `right_click` | The visitor opens the context menu on an element. | `element`, `feature_list`, `session` | `experience`, `step` |
175
- | `copy` | The visitor copies a selection. | `feature_list`, `session` | `element`, `experience`, `step` |
176
- | `paste` | The visitor copies text into a field. | `feature_list`, `session` | `element`, `experience`, `step` |
177
- | `drag` | The visitor drags an element. | `feature_list`, `session` | `element`, `experience`, `step` |
178
- | `backspace` | The visitor deletes a character in a field. | `element`, `feature_list`, `session` | `experience`, `step` |
179
- | `scroll` | The visitor scrolls. | `feature_list`, `session` | `element`, `experience`, `step` |
180
- | `rapid_scroll` | The visitor scrolls up and down fast. | `feature_list`, `session` | `element`, `experience`, `step` |
181
- | `mouse_shake` | The visitor moves the pointer fast from side to side. | `feature_list`, `session` | `experience`, `step` |
170
+ | Interaction type | When it fires | Always attached | Attached when available |
171
+ | ---------------- | ----------------------------------------------------------------- | ------------------------------------ | -------------------------------------------- |
172
+ | `click` | The visitor clicks an element. | `element`, `feature_list`, `session` | `experience`, `step`, `workspace` |
173
+ | `rapid_click` | The visitor clicks the same element many times in a short period. | `element`, `feature_list`, `session` | `experience`, `step`, `workspace` |
174
+ | `right_click` | The visitor opens the context menu on an element. | `element`, `feature_list`, `session` | `experience`, `step`, `workspace` |
175
+ | `copy` | The visitor copies a selection. | `feature_list`, `session` | `element`, `experience`, `step`, `workspace` |
176
+ | `paste` | The visitor copies text into a field. | `feature_list`, `session` | `element`, `experience`, `step`, `workspace` |
177
+ | `drag` | The visitor drags an element. | `feature_list`, `session` | `element`, `experience`, `step`, `workspace` |
178
+ | `backspace` | The visitor deletes a character in a field. | `element`, `feature_list`, `session` | `experience`, `step`, `workspace` |
179
+ | `scroll` | The visitor scrolls. | `feature_list`, `session` | `element`, `experience`, `step`, `workspace` |
180
+ | `rapid_scroll` | The visitor scrolls up and down fast. | `feature_list`, `session` | `element`, `experience`, `step`, `workspace` |
181
+ | `mouse_shake` | The visitor moves the pointer fast from side to side. | `feature_list`, `session` | `experience`, `step`, `workspace` |
182
182
 
183
183
  ### Page and network interactions
184
184
 
185
185
  The SDK binds these listeners to the document when the `enableDocumentListeners` option of
186
186
  the analytics plugin is true. The option is off by default.
187
187
 
188
- | Interaction type | When it fires | Always attached | Attached when available |
189
- | --- | --- | --- | --- |
190
- | `page_visible` | The page becomes visible, such as a return to the tab. | `feature_list`, `session` | `experience`, `step` |
191
- | `page_hidden` | The page stops to be visible. | `feature_list`, `session` | `experience`, `step` |
192
- | `page_show` | The browser shows the page, and also on a return from the cache. | `feature_list`, `session` | `experience`, `step` |
193
- | `page_hide` | The browser hides the page before the visitor goes to a different page. | `feature_list`, `session` | `experience`, `step` |
194
- | `offline` | The browser loses the network. | `feature_list`, `session` | `experience`, `step` |
195
- | `online` | The browser gets the network back. | `feature_list`, `session` | `experience`, `step` |
196
- | `resize` | The window changes size. | `feature_list`, `session` | `experience`, `step` |
197
- | `unload` | The browser closes the document. | `feature_list`, `session` | `experience`, `step` |
188
+ | Interaction type | When it fires | Always attached | Attached when available |
189
+ | ---------------- | ----------------------------------------------------------------------- | ------------------------- | --------------------------------- |
190
+ | `page_visible` | The page becomes visible, such as a return to the tab. | `feature_list`, `session` | `experience`, `step`, `workspace` |
191
+ | `page_hidden` | The page stops to be visible. | `feature_list`, `session` | `experience`, `step`, `workspace` |
192
+ | `page_show` | The browser shows the page, and also on a return from the cache. | `feature_list`, `session` | `experience`, `step`, `workspace` |
193
+ | `page_hide` | The browser hides the page before the visitor goes to a different page. | `feature_list`, `session` | `experience`, `step`, `workspace` |
194
+ | `offline` | The browser loses the network. | `feature_list`, `session` | `experience`, `step`, `workspace` |
195
+ | `online` | The browser gets the network back. | `feature_list`, `session` | `experience`, `step`, `workspace` |
196
+ | `resize` | The window changes size. | `feature_list`, `session` | `experience`, `step`, `workspace` |
197
+ | `unload` | The browser closes the document. | `feature_list`, `session` | `experience`, `step`, `workspace` |
198
198
 
199
199
  ### Interactions with no listener
200
200
 
201
201
  The SDK declares these two types and sends none of them, because it binds no listener for
202
202
  them. A query on one of them gives an empty result set.
203
203
 
204
- | Interaction type | When it fires | Always attached | Attached when available |
205
- | --- | --- | --- | --- |
206
- | `back` | Nothing sends it. | `feature_list`, `session` | `experience`, `step` |
207
- | `forward` | Nothing sends it. | `feature_list`, `session` | `experience`, `step` |
204
+ | Interaction type | When it fires | Always attached | Attached when available |
205
+ | ---------------- | ----------------- | ------------------------- | --------------------------------- |
206
+ | `back` | Nothing sends it. | `feature_list`, `session` | `experience`, `step`, `workspace` |
207
+ | `forward` | Nothing sends it. | `feature_list`, `session` | `experience`, `step`, `workspace` |
208
208
 
209
209
  ## Schemas
210
210
 
@@ -212,85 +212,97 @@ Each context has a schema. Every schema also accepts a `meta` object for data of
212
212
  and keeps a property that the schema does not name. The field tables below do not repeat
213
213
  `meta`.
214
214
 
215
- | Schema | What it describes |
216
- | --- | --- |
217
- | `answer_list` | The responses of a visitor, under the earlier name of `response_list`. The SDK attaches `response_list`. |
218
- | `app` | The Picked project that the event belongs to. |
219
- | `cvly_funnel` | The version of a Convincely funnel. The SDK attaches it for no event. |
220
- | `cvly_x` | The Vercel deployment behind the site. |
221
- | `deployment` | The deployment and the environment of the SDK. |
222
- | `element` | The HTML element behind an interaction event. |
223
- | `event` | The event itself. It is not a context: it holds the event type and the `event_meta` column. |
224
- | `exception` | The reason for a failure or a validation error. |
225
- | `experience` | The experience that the visitor is in. |
226
- | `feature_list` | Each feature flag that resolved for the visitor, with the bucket of the visitor. |
227
- | `field_list` | The fields of the current step, with their options. |
228
- | `form` | The form behind a form event. |
229
- | `modal` | The modal behind a modal event. |
230
- | `order` | The order behind a purchase. |
231
- | `picked` | The SDK version. The SDK attaches it for no event. |
232
- | `product_list` | The products that the event is about. |
233
- | `question_list` | The fields of a step, under the earlier name of `field_list`. The SDK attaches `field_list`. |
234
- | `recommendation_list` | A list of recommended items. The SDK attaches it for no event. |
235
- | `response_list` | The response of the visitor to each field. |
236
- | `session` | The visitor ID, and each other identifier that Picked has for the visitor. |
237
- | `step` | The step of the flow that the visitor is on. |
215
+ | Schema | What it describes |
216
+ | --------------------- | -------------------------------------------------------------------------------------------------------- |
217
+ | `answer_list` | The responses of a visitor, under the earlier name of `response_list`. The SDK attaches `response_list`. |
218
+ | `app` | The Picked project that the event belongs to. |
219
+ | `cvly_funnel` | The version of a Convincely funnel. The SDK attaches it for no event. |
220
+ | `cvly_x` | The Vercel deployment behind the site. |
221
+ | `deployment` | The deployment and the environment of the SDK. |
222
+ | `element` | The HTML element behind an interaction event. |
223
+ | `event` | The event itself. It is not a context: it holds the event type and the `event_meta` column. |
224
+ | `exception` | The reason for a failure or a validation error. |
225
+ | `experience` | The experience that the visitor is in. |
226
+ | `feature_list` | Each feature flag that resolved for the visitor, with the bucket of the visitor. |
227
+ | `field_list` | The fields of the current step, with their options. |
228
+ | `form` | The form behind a form event. |
229
+ | `modal` | The modal behind a modal event. |
230
+ | `order` | The order behind a purchase. |
231
+ | `picked` | The SDK version. The SDK attaches it for no event. |
232
+ | `product_list` | The products that the event is about. |
233
+ | `question_list` | The fields of a step, under the earlier name of `field_list`. The SDK attaches `field_list`. |
234
+ | `recommendation_list` | A list of recommended items. The SDK attaches it for no event. |
235
+ | `response_list` | The response of the visitor to each field. |
236
+ | `session` | The visitor ID, and each other identifier that Picked has for the visitor. |
237
+ | `step` | The step of the flow that the visitor is on. |
238
+ | `workspace` | The workspace that served the project configuration, with its published version. |
238
239
 
239
240
  ### `app`
240
241
 
241
- | Field | Type | Required | Description |
242
- | --- | --- | --- | --- |
243
- | `project_id` | `string` | Yes | The project ID. |
242
+ | Field | Type | Required | Description |
243
+ | ------------ | -------- | -------- | --------------- |
244
+ | `project_id` | `string` | Yes | The project ID. |
244
245
 
245
246
  ### `deployment`
246
247
 
247
- | Field | Type | Required | Description |
248
- | --- | --- | --- | --- |
249
- | `env` | `string` | Yes | The environment of the deployment. |
250
- | `id` | `string` or `null` | No | The deployment ID. |
251
- | `sha` | `string` or `null` | No | The Git hash of the deployment. |
252
- | `host` | `string` or `null` | No | The host of the deployment. |
248
+ | Field | Type | Required | Description |
249
+ | ------ | ------------------ | -------- | ---------------------------------- |
250
+ | `env` | `string` | Yes | The environment of the deployment. |
251
+ | `id` | `string` or `null` | No | The deployment ID. |
252
+ | `sha` | `string` or `null` | No | The Git hash of the deployment. |
253
+ | `host` | `string` or `null` | No | The host of the deployment. |
253
254
 
254
255
  ### `cvly_x`
255
256
 
256
- | Field | Type | Required | Description |
257
- | --- | --- | --- | --- |
258
- | `vercel_deployment_id` | `string` | Yes | The Vercel deployment ID. |
259
- | `vercel_env` | `string` | Yes | The Vercel environment. |
260
- | `vercel_url` | `string` | Yes | The URL of the Vercel deployment. |
261
- | `git_commit_sha` | `string` or `null` | No | The Git hash of the deployment. |
257
+ | Field | Type | Required | Description |
258
+ | ---------------------- | ------------------ | -------- | --------------------------------- |
259
+ | `vercel_deployment_id` | `string` | Yes | The Vercel deployment ID. |
260
+ | `vercel_env` | `string` | Yes | The Vercel environment. |
261
+ | `vercel_url` | `string` | Yes | The URL of the Vercel deployment. |
262
+ | `git_commit_sha` | `string` or `null` | No | The Git hash of the deployment. |
262
263
 
263
264
  ### `session`
264
265
 
265
266
  The `session` context describes the visitor, and not one visit. The schema has no required
266
267
  field. A value is `null` until Picked has it.
267
268
 
268
- | Field | Type | Required | Description |
269
- | --- | --- | --- | --- |
270
- | `id` | `string` or `null` | No | The visitor ID. The SDK makes one ID for each browser, and keeps it in browser storage across visits. It is `Lead.userId` in the Management API. |
271
- | `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. |
272
- | `gaid` | `string` or `null` | No | The client ID from Google Analytics. |
273
- | `shopify_client_id` | `string` or `null` | No | The Shopify client ID. |
274
- | `shopify_customer_id` | `string` or `null` | No | The Shopify customer ID. |
275
- | `shopify_checkout_token` | `string` or `null` | No | The Shopify checkout token. |
276
- | `fingerprintjs_visitor_id` | `string` or `null` | No | The FingerprintJS visitor ID. |
277
- | `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 visitor ID. |
269
+ | Field | Type | Required | Description |
270
+ | -------------------------- | ------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
271
+ | `id` | `string` or `null` | No | The visitor ID. The SDK makes one ID for each browser, and keeps it in browser storage across visits. It is `Lead.userId` in the Management API. |
272
+ | `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. |
273
+ | `gaid` | `string` or `null` | No | The client ID from Google Analytics. |
274
+ | `shopify_client_id` | `string` or `null` | No | The Shopify client ID. |
275
+ | `shopify_customer_id` | `string` or `null` | No | The Shopify customer ID. |
276
+ | `shopify_checkout_token` | `string` or `null` | No | The Shopify checkout token. |
277
+ | `fingerprintjs_visitor_id` | `string` or `null` | No | The FingerprintJS visitor ID. |
278
+
279
+ ### `workspace`
280
+
281
+ The SDK attaches the `workspace` context after it registers a project configuration. The
282
+ schema has no required field.
283
+
284
+ | Field | Type | Required | Description |
285
+ | ------------ | ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------- |
286
+ | `id` | `string` or `null` | No | The workspace ID. |
287
+ | `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. |
288
+ | `status` | `string` or `null` | No | The workspace status. A published configuration has the status `live`. |
278
289
 
279
290
  ### `experience`
280
291
 
281
- | Field | Type | Required | Description |
282
- | --- | --- | --- | --- |
283
- | `id` | `string` | Yes | The experience ID. |
284
- | `title` | `string` | Yes | The experience title. It is the `title` column of `experiences` in Picked Analytics. |
285
- | `type` | `string` or `null` | No | The experience type. |
292
+ | Field | Type | Required | Description |
293
+ | ------- | ------------------ | -------- | ------------------------------------------------------------------------------------ |
294
+ | `id` | `string` | Yes | The experience ID. |
295
+ | `title` | `string` | Yes | The experience title. It is the `title` column of `experiences` in Picked Analytics. |
296
+ | `type` | `string` or `null` | No | The experience type. |
297
+ | `key` | `string` or `null` | No | The experience key. It stays the same in each workspace. |
286
298
 
287
299
  ### `step`
288
300
 
289
- | Field | Type | Required | Description |
290
- | --- | --- | --- | --- |
291
- | `id` | `string` | Yes | The step ID. It is the `step_id` column of `fact_events` in Picked Analytics. |
292
- | `title` | `string` | Yes | The step title. It is the `title` column of `steps` in Picked Analytics. |
293
- | `key` | `string` or `null` | No | The stable key of the step. It does not change between versions. |
301
+ | Field | Type | Required | Description |
302
+ | ------- | ------------------ | -------- | ----------------------------------------------------------------------------- |
303
+ | `id` | `string` | Yes | The step ID. It is the `step_id` column of `fact_events` in Picked Analytics. |
304
+ | `title` | `string` | Yes | The step title. It is the `title` column of `steps` in Picked Analytics. |
305
+ | `key` | `string` or `null` | No | The stable key of the step. It does not change between versions. |
294
306
 
295
307
  ### `feature_list`
296
308
 
@@ -301,158 +313,158 @@ Two more columns of `fact_events` come from the visit, and not from the event. T
301
313
  `features` column maps each `ab_feature` to its `ab_bucket`. The `feature_keys` column maps
302
314
  each `ab_feature` to its `ab_key`.
303
315
 
304
- | Field | Type | Required | Description |
305
- | --- | --- | --- | --- |
306
- | `items` | `array` | Yes | One entry for each feature flag. |
307
- | `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. |
308
- | `items[].ab_name` | `string` | Yes | The name of the feature flag. |
309
- | `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`. |
310
- | `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. |
316
+ | Field | Type | Required | Description |
317
+ | -------------------- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
318
+ | `items` | `array` | Yes | One entry for each feature flag. |
319
+ | `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. |
320
+ | `items[].ab_name` | `string` | Yes | The name of the feature flag. |
321
+ | `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`. |
322
+ | `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. |
311
323
 
312
324
  ### `field_list`
313
325
 
314
- | Field | Type | Required | Description |
315
- | --- | --- | --- | --- |
316
- | `items` | `array` | Yes | One entry for each field of the step. |
317
- | `items[].id` | `string` | Yes | The field ID. |
318
- | `items[].type` | `string` | Yes | The field type. |
319
- | `items[].label` | `string` | Yes | The field label. |
320
- | `items[].options` | `array` or `null` | No | The options that the field gives. |
321
- | `items[].options[].id` | `string` | Yes | The option ID. |
322
- | `items[].options[].label` | `string` | Yes | The option label. |
323
- | `items[].options[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | The value behind the option. |
326
+ | Field | Type | Required | Description |
327
+ | ------------------------- | ----------------------------------------------------------- | -------- | ------------------------------------- |
328
+ | `items` | `array` | Yes | One entry for each field of the step. |
329
+ | `items[].id` | `string` | Yes | The field ID. |
330
+ | `items[].type` | `string` | Yes | The field type. |
331
+ | `items[].label` | `string` | Yes | The field label. |
332
+ | `items[].options` | `array` or `null` | No | The options that the field gives. |
333
+ | `items[].options[].id` | `string` | Yes | The option ID. |
334
+ | `items[].options[].label` | `string` | Yes | The option label. |
335
+ | `items[].options[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | The value behind the option. |
324
336
 
325
337
  ### `response_list`
326
338
 
327
- | Field | Type | Required | Description |
328
- | --- | --- | --- | --- |
329
- | `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. |
330
- | `items[].field_id` | `string` | Yes | The key of the field, and not the `id` of the field in `field_list`. |
331
- | `items[].values` | `array` | Yes | The values that the visitor gave. |
332
- | `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | One response value. |
339
+ | Field | Type | Required | Description |
340
+ | ------------------------ | ----------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
341
+ | `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. |
342
+ | `items[].field_id` | `string` | Yes | The key of the field, and not the `id` of the field in `field_list`. |
343
+ | `items[].values` | `array` | Yes | The values that the visitor gave. |
344
+ | `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | One response value. |
333
345
 
334
346
  ### `form`
335
347
 
336
- | Field | Type | Required | Description |
337
- | --- | --- | --- | --- |
338
- | `id` | `string` | Yes | The form ID. |
339
- | `title` | `string` or `null` | No | The form title. |
348
+ | Field | Type | Required | Description |
349
+ | ------- | ------------------ | -------- | --------------- |
350
+ | `id` | `string` | Yes | The form ID. |
351
+ | `title` | `string` or `null` | No | The form title. |
340
352
 
341
353
  ### `modal`
342
354
 
343
- | Field | Type | Required | Description |
344
- | --- | --- | --- | --- |
345
- | `id` | `string` | Yes | The modal ID. |
346
- | `title` | `string` | Yes | The modal title. |
355
+ | Field | Type | Required | Description |
356
+ | ------- | -------- | -------- | ---------------- |
357
+ | `id` | `string` | Yes | The modal ID. |
358
+ | `title` | `string` | Yes | The modal title. |
347
359
 
348
360
  ### `element`
349
361
 
350
- | Field | Type | Required | Description |
351
- | --- | --- | --- | --- |
352
- | `node_type` | `string` | Yes | The HTML tag name in lower case. It is `unknown` when the event has no element. |
353
- | `id` | `string` or `null` | No | The `id` attribute of the element. |
354
- | `text` | `string` or `null` | No | The text content of the element, to 255 characters. |
355
- | `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. |
362
+ | Field | Type | Required | Description |
363
+ | ----------- | ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
364
+ | `node_type` | `string` | Yes | The HTML tag name in lower case. It is `unknown` when the event has no element. |
365
+ | `id` | `string` or `null` | No | The `id` attribute of the element. |
366
+ | `text` | `string` or `null` | No | The text content of the element, to 255 characters. |
367
+ | `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. |
356
368
 
357
369
  ### `exception`
358
370
 
359
- | Field | Type | Required | Description |
360
- | --- | --- | --- | --- |
361
- | `reason` | `string` | Yes | The reason for the failure. |
371
+ | Field | Type | Required | Description |
372
+ | -------- | -------- | -------- | --------------------------- |
373
+ | `reason` | `string` | Yes | The reason for the failure. |
362
374
 
363
375
  ### `product_list`
364
376
 
365
377
  `items` follows the item format of GA4 Enhanced Ecommerce, so a variable in Google Tag
366
378
  Manager maps onto it directly. Every item field accepts `null`.
367
379
 
368
- | Field | Type | Required | Description |
369
- | --- | --- | --- | --- |
370
- | `items` | `array` | Yes | One entry for each product. |
371
- | `title` | `string` or `null` | No | The title of the list. |
372
- | `items[].item_id` | `string` or `null` | No | The product ID. `dim_product` in Picked Analytics does not keep it. |
373
- | `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. |
374
- | `items[].item_brand` | `string` or `null` | No | The brand. |
375
- | `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. |
376
- | `items[].item_variant` | `string` or `null` | No | The variant. |
377
- | `items[].item_list_id` | `string` or `null` | No | The ID of the list that the product came from. |
378
- | `items[].item_list_name` | `string` or `null` | No | The name of that list. |
379
- | `items[].price` | `number` or `null` | No | The price of one item. |
380
- | `items[].quantity` | `number` or `null` | No | The quantity. |
381
- | `items[].discount` | `number` or `null` | No | The discount on the item. |
382
- | `items[].currency` | `string` or `null` | No | The currency code. |
383
- | `items[].coupon` | `string` or `null` | No | The coupon code. |
384
- | `items[].affiliation` | `string` or `null` | No | The store behind the order. |
385
- | `items[].index` | `number` or `null` | No | The position of the product in the list. |
386
- | `items[].location_id` | `string` or `null` | No | The location of the store. |
387
- | `items[].promotion_id` | `string` or `null` | No | The promotion ID. |
388
- | `items[].promotion_name` | `string` or `null` | No | The promotion name. |
389
- | `items[].creative_name` | `string` or `null` | No | The creative name. |
390
- | `items[].creative_slot` | `string` or `null` | No | The creative slot. |
391
- | `items[].in_stock` | `boolean` or `null` | No | True when the product is in stock. |
380
+ | Field | Type | Required | Description |
381
+ | ------------------------ | ------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
382
+ | `items` | `array` | Yes | One entry for each product. |
383
+ | `title` | `string` or `null` | No | The title of the list. |
384
+ | `items[].item_id` | `string` or `null` | No | The product ID. `dim_product` in Picked Analytics does not keep it. |
385
+ | `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. |
386
+ | `items[].item_brand` | `string` or `null` | No | The brand. |
387
+ | `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. |
388
+ | `items[].item_variant` | `string` or `null` | No | The variant. |
389
+ | `items[].item_list_id` | `string` or `null` | No | The ID of the list that the product came from. |
390
+ | `items[].item_list_name` | `string` or `null` | No | The name of that list. |
391
+ | `items[].price` | `number` or `null` | No | The price of one item. |
392
+ | `items[].quantity` | `number` or `null` | No | The quantity. |
393
+ | `items[].discount` | `number` or `null` | No | The discount on the item. |
394
+ | `items[].currency` | `string` or `null` | No | The currency code. |
395
+ | `items[].coupon` | `string` or `null` | No | The coupon code. |
396
+ | `items[].affiliation` | `string` or `null` | No | The store behind the order. |
397
+ | `items[].index` | `number` or `null` | No | The position of the product in the list. |
398
+ | `items[].location_id` | `string` or `null` | No | The location of the store. |
399
+ | `items[].promotion_id` | `string` or `null` | No | The promotion ID. |
400
+ | `items[].promotion_name` | `string` or `null` | No | The promotion name. |
401
+ | `items[].creative_name` | `string` or `null` | No | The creative name. |
402
+ | `items[].creative_slot` | `string` or `null` | No | The creative slot. |
403
+ | `items[].in_stock` | `boolean` or `null` | No | True when the product is in stock. |
392
404
 
393
405
  ### `order`
394
406
 
395
- | Field | Type | Required | Description |
396
- | --- | --- | --- | --- |
397
- | `id` | `string` | Yes | The order ID. It is the `order_id` column of `fact_events` in Picked Analytics. |
398
- | `customer_id` | `string` or `null` | No | The customer ID in the store. |
399
- | `checkout_token` | `string` or `null` | No | The checkout token in the store. |
400
- | `cart_token` | `string` or `null` | No | The cart token in the store. |
407
+ | Field | Type | Required | Description |
408
+ | ---------------- | ------------------ | -------- | ------------------------------------------------------------------------------- |
409
+ | `id` | `string` | Yes | The order ID. It is the `order_id` column of `fact_events` in Picked Analytics. |
410
+ | `customer_id` | `string` or `null` | No | The customer ID in the store. |
411
+ | `checkout_token` | `string` or `null` | No | The checkout token in the store. |
412
+ | `cart_token` | `string` or `null` | No | The cart token in the store. |
401
413
 
402
414
  ### `event`
403
415
 
404
416
  The event schema wraps every event, and it is not a context.
405
417
 
406
- | Field | Type | Required | Description |
407
- | --- | --- | --- | --- |
408
- | `type` | `string` | Yes | The event type. It is the `event_type` column of `fact_events` in Picked Analytics. |
418
+ | Field | Type | Required | Description |
419
+ | ------ | -------- | -------- | ----------------------------------------------------------------------------------- |
420
+ | `type` | `string` | Yes | The event type. It is the `event_type` column of `fact_events` in Picked Analytics. |
409
421
 
410
422
  The `meta` object of this schema is the `event_meta` column of `fact_events` in Picked Analytics.
411
423
 
412
424
  ### `recommendation_list`
413
425
 
414
- | Field | Type | Required | Description |
415
- | --- | --- | --- | --- |
416
- | `title` | `string` | Yes | The title of the list. |
417
- | `items` | `array` | Yes | One entry for each recommended item. |
418
- | `items[].sku` | `string` | Yes | The SKU of the item. |
419
- | `items[].title` | `string` | Yes | The title of the item. |
426
+ | Field | Type | Required | Description |
427
+ | --------------- | -------- | -------- | ------------------------------------ |
428
+ | `title` | `string` | Yes | The title of the list. |
429
+ | `items` | `array` | Yes | One entry for each recommended item. |
430
+ | `items[].sku` | `string` | Yes | The SKU of the item. |
431
+ | `items[].title` | `string` | Yes | The title of the item. |
420
432
 
421
433
  ### `question_list`
422
434
 
423
435
  `question_list` is the earlier name of `field_list`, and it has the same shape. On an item
424
436
  and on an option, `title` takes the place of `label`.
425
437
 
426
- | Field | Type | Required | Description |
427
- | --- | --- | --- | --- |
428
- | `items` | `array` | Yes | One entry for each question. |
429
- | `items[].id` | `string` | Yes | The question ID. |
430
- | `items[].type` | `string` | Yes | The question type. |
431
- | `items[].title` | `string` | Yes | The question title. |
432
- | `items[].options` | `array` or `null` | No | The options that the question gives. |
438
+ | Field | Type | Required | Description |
439
+ | ----------------- | ----------------- | -------- | ------------------------------------ |
440
+ | `items` | `array` | Yes | One entry for each question. |
441
+ | `items[].id` | `string` | Yes | The question ID. |
442
+ | `items[].type` | `string` | Yes | The question type. |
443
+ | `items[].title` | `string` | Yes | The question title. |
444
+ | `items[].options` | `array` or `null` | No | The options that the question gives. |
433
445
 
434
446
  ### `answer_list`
435
447
 
436
448
  `answer_list` is the earlier name of `response_list`, and it has the same shape.
437
449
 
438
- | Field | Type | Required | Description |
439
- | --- | --- | --- | --- |
440
- | `items` | `array` | Yes | One entry for each question with an answer. |
441
- | `items[].question_id` | `string` | Yes | The ID of the question. |
442
- | `items[].values` | `array` | Yes | The values that the visitor gave. |
443
- | `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | One answer value. |
450
+ | Field | Type | Required | Description |
451
+ | ------------------------ | ----------------------------------------------------------- | -------- | ------------------------------------------- |
452
+ | `items` | `array` | Yes | One entry for each question with an answer. |
453
+ | `items[].question_id` | `string` | Yes | The ID of the question. |
454
+ | `items[].values` | `array` | Yes | The values that the visitor gave. |
455
+ | `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes | One answer value. |
444
456
 
445
457
  ### `cvly_funnel`
446
458
 
447
- | Field | Type | Required | Description |
448
- | --- | --- | --- | --- |
449
- | `version` | `string` | Yes | The version of the funnel. |
459
+ | Field | Type | Required | Description |
460
+ | --------- | -------- | -------- | -------------------------- |
461
+ | `version` | `string` | Yes | The version of the funnel. |
450
462
 
451
463
  ### `picked`
452
464
 
453
- | Field | Type | Required | Description |
454
- | --- | --- | --- | --- |
455
- | `sdk_version` | `string` | Yes | The version of the SDK. |
465
+ | Field | Type | Required | Description |
466
+ | ------------- | -------- | -------- | ----------------------- |
467
+ | `sdk_version` | `string` | Yes | The version of the SDK. |
456
468
 
457
469
  ## Related
458
470