picked 0.0.116-next.3 → 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.
- package/dist/.tsbuildinfo +1 -1
- package/docs/reference/sdk/analytics-events.md +247 -235
- package/package.json +4 -4
|
@@ -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
|
|
43
|
-
|
|
|
44
|
-
| `app_load`
|
|
45
|
-
| `app_initialize`
|
|
46
|
-
| `experience_load` | An experience starts.
|
|
47
|
-
| `app_open`
|
|
48
|
-
| `app_close`
|
|
49
|
-
| `feature_decide`
|
|
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
|
|
68
|
-
|
|
|
69
|
-
| `step_enter`
|
|
70
|
-
| `step_submit`
|
|
71
|
-
| `step_submit_success`
|
|
72
|
-
| `step_submit_error`
|
|
73
|
-
| `step_complete`
|
|
74
|
-
| `form_submit`
|
|
75
|
-
| `form_submit_success`
|
|
76
|
-
| `form_submit_error`
|
|
77
|
-
| `field_validation_error` | A field value fails a validation rule.
|
|
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
|
|
86
|
-
|
|
|
87
|
-
| `cart_add`
|
|
88
|
-
| `cart_remove`
|
|
89
|
-
| `checkout_start`
|
|
90
|
-
| `checkout_complete`
|
|
91
|
-
| `order_create`
|
|
92
|
-
| `product_list_view`
|
|
93
|
-
| `product_select`
|
|
94
|
-
| `product_view_details`
|
|
95
|
-
| `search_results_list_view` | The visitor sees a list of search results.
|
|
96
|
-
| `recommendation_present`
|
|
97
|
-
| `wishlist_add`
|
|
98
|
-
| `waitlist_join`
|
|
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
|
|
111
|
-
|
|
|
112
|
-
| `cart_add`
|
|
113
|
-
| `cart_remove`
|
|
114
|
-
| `checkout_start`
|
|
115
|
-
| `checkout_complete`
|
|
116
|
-
| `order_create`
|
|
117
|
-
| `product_list_view`
|
|
118
|
-
| `product_view_details` | The `product_viewed` pixel event, for one product variant.
|
|
119
|
-
| `page_view`
|
|
120
|
-
| `identify`
|
|
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
|
|
129
|
-
|
|
|
130
|
-
| `page_view`
|
|
131
|
-
| `identify`
|
|
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`
|
|
133
|
-
| `lead_created` | The Picked API records the lead from a capture.
|
|
134
|
-
| `lead_updated` | The Picked API changes the responses of a lead from a later capture.
|
|
135
|
-
| `modal_open`
|
|
136
|
-
| `modal_close`
|
|
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
|
|
171
|
-
|
|
|
172
|
-
| `click`
|
|
173
|
-
| `rapid_click`
|
|
174
|
-
| `right_click`
|
|
175
|
-
| `copy`
|
|
176
|
-
| `paste`
|
|
177
|
-
| `drag`
|
|
178
|
-
| `backspace`
|
|
179
|
-
| `scroll`
|
|
180
|
-
| `rapid_scroll`
|
|
181
|
-
| `mouse_shake`
|
|
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
|
|
189
|
-
|
|
|
190
|
-
| `page_visible`
|
|
191
|
-
| `page_hidden`
|
|
192
|
-
| `page_show`
|
|
193
|
-
| `page_hide`
|
|
194
|
-
| `offline`
|
|
195
|
-
| `online`
|
|
196
|
-
| `resize`
|
|
197
|
-
| `unload`
|
|
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
|
|
205
|
-
|
|
|
206
|
-
| `back`
|
|
207
|
-
| `forward`
|
|
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
|
|
216
|
-
|
|
|
217
|
-
| `answer_list`
|
|
218
|
-
| `app`
|
|
219
|
-
| `cvly_funnel`
|
|
220
|
-
| `cvly_x`
|
|
221
|
-
| `deployment`
|
|
222
|
-
| `element`
|
|
223
|
-
| `event`
|
|
224
|
-
| `exception`
|
|
225
|
-
| `experience`
|
|
226
|
-
| `feature_list`
|
|
227
|
-
| `field_list`
|
|
228
|
-
| `form`
|
|
229
|
-
| `modal`
|
|
230
|
-
| `order`
|
|
231
|
-
| `picked`
|
|
232
|
-
| `product_list`
|
|
233
|
-
| `question_list`
|
|
234
|
-
| `recommendation_list` | A list of recommended items. The SDK attaches it for no event.
|
|
235
|
-
| `response_list`
|
|
236
|
-
| `session`
|
|
237
|
-
| `step`
|
|
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
|
|
242
|
-
|
|
|
243
|
-
| `project_id` | `string` | Yes
|
|
242
|
+
| Field | Type | Required | Description |
|
|
243
|
+
| ------------ | -------- | -------- | --------------- |
|
|
244
|
+
| `project_id` | `string` | Yes | The project ID. |
|
|
244
245
|
|
|
245
246
|
### `deployment`
|
|
246
247
|
|
|
247
|
-
| Field
|
|
248
|
-
|
|
|
249
|
-
| `env`
|
|
250
|
-
| `id`
|
|
251
|
-
| `sha`
|
|
252
|
-
| `host` | `string` or `null` | No
|
|
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
|
|
257
|
-
|
|
|
258
|
-
| `vercel_deployment_id` | `string`
|
|
259
|
-
| `vercel_env`
|
|
260
|
-
| `vercel_url`
|
|
261
|
-
| `git_commit_sha`
|
|
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
|
|
269
|
-
|
|
|
270
|
-
| `id`
|
|
271
|
-
| `is_user`
|
|
272
|
-
| `gaid`
|
|
273
|
-
| `shopify_client_id`
|
|
274
|
-
| `shopify_customer_id`
|
|
275
|
-
| `shopify_checkout_token`
|
|
276
|
-
| `fingerprintjs_visitor_id` | `string` or `null`
|
|
277
|
-
|
|
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
|
|
282
|
-
|
|
|
283
|
-
| `id`
|
|
284
|
-
| `title` | `string`
|
|
285
|
-
| `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
|
|
290
|
-
|
|
|
291
|
-
| `id`
|
|
292
|
-
| `title` | `string`
|
|
293
|
-
| `key`
|
|
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
|
|
305
|
-
|
|
|
306
|
-
| `items`
|
|
307
|
-
| `items[].ab_feature` | `string`
|
|
308
|
-
| `items[].ab_name`
|
|
309
|
-
| `items[].ab_key`
|
|
310
|
-
| `items[].ab_bucket`
|
|
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
|
|
315
|
-
|
|
|
316
|
-
| `items`
|
|
317
|
-
| `items[].id`
|
|
318
|
-
| `items[].type`
|
|
319
|
-
| `items[].label`
|
|
320
|
-
| `items[].options`
|
|
321
|
-
| `items[].options[].id`
|
|
322
|
-
| `items[].options[].label` | `string`
|
|
323
|
-
| `items[].options[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes
|
|
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
|
|
328
|
-
|
|
|
329
|
-
| `items`
|
|
330
|
-
| `items[].field_id`
|
|
331
|
-
| `items[].values`
|
|
332
|
-
| `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes
|
|
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
|
|
337
|
-
|
|
|
338
|
-
| `id`
|
|
339
|
-
| `title` | `string` or `null` | No
|
|
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
|
|
344
|
-
|
|
|
345
|
-
| `id`
|
|
346
|
-
| `title` | `string` | Yes
|
|
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
|
|
351
|
-
|
|
|
352
|
-
| `node_type` | `string`
|
|
353
|
-
| `id`
|
|
354
|
-
| `text`
|
|
355
|
-
| `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
|
|
360
|
-
|
|
|
361
|
-
| `reason` | `string` | Yes
|
|
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
|
|
369
|
-
|
|
|
370
|
-
| `items`
|
|
371
|
-
| `title`
|
|
372
|
-
| `items[].item_id`
|
|
373
|
-
| `items[].item_name`
|
|
374
|
-
| `items[].item_brand`
|
|
375
|
-
| `items[].item_category`
|
|
376
|
-
| `items[].item_variant`
|
|
377
|
-
| `items[].item_list_id`
|
|
378
|
-
| `items[].item_list_name` | `string` or `null`
|
|
379
|
-
| `items[].price`
|
|
380
|
-
| `items[].quantity`
|
|
381
|
-
| `items[].discount`
|
|
382
|
-
| `items[].currency`
|
|
383
|
-
| `items[].coupon`
|
|
384
|
-
| `items[].affiliation`
|
|
385
|
-
| `items[].index`
|
|
386
|
-
| `items[].location_id`
|
|
387
|
-
| `items[].promotion_id`
|
|
388
|
-
| `items[].promotion_name` | `string` or `null`
|
|
389
|
-
| `items[].creative_name`
|
|
390
|
-
| `items[].creative_slot`
|
|
391
|
-
| `items[].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
|
|
396
|
-
|
|
|
397
|
-
| `id`
|
|
398
|
-
| `customer_id`
|
|
399
|
-
| `checkout_token` | `string` or `null` | No
|
|
400
|
-
| `cart_token`
|
|
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
|
|
407
|
-
|
|
|
408
|
-
| `type` | `string` | Yes
|
|
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
|
|
415
|
-
|
|
|
416
|
-
| `title`
|
|
417
|
-
| `items`
|
|
418
|
-
| `items[].sku`
|
|
419
|
-
| `items[].title` | `string` | Yes
|
|
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
|
|
427
|
-
|
|
|
428
|
-
| `items`
|
|
429
|
-
| `items[].id`
|
|
430
|
-
| `items[].type`
|
|
431
|
-
| `items[].title`
|
|
432
|
-
| `items[].options` | `array` or `null` | No
|
|
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
|
|
439
|
-
|
|
|
440
|
-
| `items`
|
|
441
|
-
| `items[].question_id`
|
|
442
|
-
| `items[].values`
|
|
443
|
-
| `items[].values[].value` | `string`, `number`, `boolean`, `object`, `array`, or `null` | Yes
|
|
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
|
|
448
|
-
|
|
|
449
|
-
| `version` | `string` | Yes
|
|
459
|
+
| Field | Type | Required | Description |
|
|
460
|
+
| --------- | -------- | -------- | -------------------------- |
|
|
461
|
+
| `version` | `string` | Yes | The version of the funnel. |
|
|
450
462
|
|
|
451
463
|
### `picked`
|
|
452
464
|
|
|
453
|
-
| Field
|
|
454
|
-
|
|
|
455
|
-
| `sdk_version` | `string` | Yes
|
|
465
|
+
| Field | Type | Required | Description |
|
|
466
|
+
| ------------- | -------- | -------- | ----------------------- |
|
|
467
|
+
| `sdk_version` | `string` | Yes | The version of the SDK. |
|
|
456
468
|
|
|
457
469
|
## Related
|
|
458
470
|
|