Skip to Content
EventsInteraction Events

Interaction Events

Events fired during user interactions.

ButtonClickEvent

Fired when a button is clicked.

interface ButtonClickEvent extends BaseSDKEvent { type: 'button_click'; button_id: string; button_text: string; screen_id: string; action: 'navigate' | 'none'; target_screen_id?: string; }
FieldTypeDescription
button_idstringUnique button identifier
button_textstringButton label text
screen_idstringCurrent screen ID
action'navigate' | 'none'Button action type
target_screen_idstring?Target screen (if action is navigate)
<BegynnOnboarding placementId="your-placement-id" onButtonClick={(event) => { console.log("Button clicked:", event.button_text); if (event.action === 'navigate') { console.log("Navigating to:", event.target_screen_id); } }} />

ChoiceSelectEvent

Fired when a choice is selected in a choicelist.

interface ChoiceSelectEvent extends BaseSDKEvent { type: 'choice_select'; choicelist_id: string; option_id: string; option_title: string; screen_id: string; mode: 'single' | 'multiple'; all_selected: string[]; }
FieldTypeDescription
choicelist_idstringChoicelist identifier
option_idstringSelected option ID
option_titlestringSelected option text
screen_idstringCurrent screen ID
mode'single' | 'multiple'Selection mode
all_selectedstring[]All currently selected option IDs
<BegynnOnboarding placementId="your-placement-id" onChoiceSelect={(event) => { console.log("Selected:", event.option_title); console.log("All selections:", event.all_selected); if (event.mode === 'multiple') { console.log("User can select more options"); } }} />

ChoiceDeselectEvent

Fired when a choice is deselected (in multiple selection mode).

interface ChoiceDeselectEvent extends BaseSDKEvent { type: 'choice_deselect'; choicelist_id: string; option_id: string; option_title: string; screen_id: string; all_selected: string[]; }
FieldTypeDescription
choicelist_idstringChoicelist identifier
option_idstringDeselected option ID
option_titlestringDeselected option text
screen_idstringCurrent screen ID
all_selectedstring[]Remaining selected option IDs
<BegynnOnboarding placementId="your-placement-id" onChoiceDeselect={(event) => { console.log("Deselected:", event.option_title); console.log("Remaining selections:", event.all_selected); }} />
Last updated on