Events
Events
Section titled “Events”popup_shownpopup_clickedsurvey_completed
Base type
Section titled “Base type”interface DeepdotsEvent { type: 'popup_shown' | 'popup_clicked' | 'survey_completed'; surveyId: string; timestamp: number; data?: Record<string, unknown>;}Subscription
Section titled “Subscription”const onShown = (event) => console.log(event);
popups.on('popup_shown', onShown);popups.off('popup_shown', onShown);Common fields in data
Section titled “Common fields in data”popupIdactionuserId
Note on popup_clicked
Section titled “Note on popup_clicked”popup_clicked is a general interaction event. Depending on the flow, data.action can include values such as loaded, start_survey, manual_send, back, complete, or close_icon.