Product guide user events
Prerequisites
Event type
typescript
type CustomEventType =
| 'init'
| 'load_more_products'
| 'restart'
| 'skip'
| 'undo'
| 'option'
| 'form'
| 'form_email'
| 'form_phone'
| 'form_other'
| 'prod_click'
| 'recommendation_receive'
| 'view'
| 'placement_load'
| 'placement_view'
| 'modal_cta_click'
| 'flag_click'
| 'split_click';
type CustomEvent<T extends CustomEventType = CustomEventType> = { type: T;
stepId?: string;
productGuideId?: string;
placementId?: string } & (
T extends 'skip'
? { type: 'skip'; value: { from: string } }
: T extends 'undo'
? { type: 'undo'; value: { to: string } }
: T extends 'option'
? { type: 'option'; value: { options: { uuid: string; title: string }[]; clicked: string[] } }
: T extends 'prod_click'
? { type: 'prod_click'; value: { name: string; pid: string; resultName: string; suuid: string } }
: T extends 'recommendation_receive'
? { type: 'recommendation_receive'; value: { prodCount: number; name: string; productIds: string[] } }
: T extends 'view'
? { type: 'view'; value: { name: string } }
: T extends 'form_email'
? { type: 'form_email'; value: string }
: T extends 'form_phone'
? { type: 'form_phone'; value: string }
: T extends 'form_other'
? { type: 'form_other'; value: Record<string, string | number | boolean> }
: T extends 'form'
? { type: 'form'; value: Record<string, string | number | boolean> & { email?: string; phone?: string } }
: { type: T });How to use
Note
Last updated
Was this helpful?

