Popin provides JavaScript events through window.popinEvent
to help track user actions, permissions, and call activities on the widget.
Place the following snippet below the Popin integration script:
window.popinEvent = (event, data) => {
if (event === "popin_captured") {
// Example: Call FB event function here
fbq("trackCustom", "popinCapture", {
name: data.name,
mobile: data.mobile,
});
}
};
Each event is triggered with a specific payload. You can integrate these events with your analytics, backend systems, or third-party tools.
Description: Triggered when a nudge popup is displayed to the user.
Payload:
{
"uid": "string"
}
Description: Triggered when the user opens the nudge popup.
Payload:
{
"uid": "string"
}
Description: Triggered when the user closes the nudge popup.
Payload:
{
"uid": "string"
}
Description: Triggered when the user grants microphone and/or camera permissions.
Payload:
{
"uid": "string",
"audio": true,
"video": true
}
Description: Triggered when the user denies microphone and/or camera permissions.
Payload:
{
"uid": "string",
"audio": true,
"video": true
}
Description: Triggered when the expert is busy and cannot take the call.
Payload:
{
"uid": "string"
}
Description: Triggered when the user submits a rating and optional feedback after a call.
Payload:
{
"uid": "string",
"rating": "integer",
"comment": "string"
}
Description: Triggered when the user schedules a call.
Payload:
{
"uid": "string",
"timezone": "string",
"time": "string"
}
Description: Triggered when a call ends.
Payload:
{
"uid": "string",
"callId": "string",
"invited": true
}
Description: Triggered when a new user/lead is captured via the widget.
Empty or null fields are automatically filtered out.
Payload:
{
"name": "string",
"email": "string",
"country": "string",
"mobile": "string",
"city": "string",
"pin_code": "string",
"group": "string",
"uid": "string"
}
Description: Triggered when the user navigates to different screens.
Payload:
{
"uid": "string",
"screen": "string"
}
Available Screens:
SCREEN_CAPTURE_USER_INFO
– Screen that captures user info like name, number, email, etc.
SCREEN_CONNECT_OR_SCHEDULE
– Screen to choose between a live call or scheduling a call for later.
SCREEN_CONNECT_GATE_QUEUE
– Permission screen.
SCREEN_SCHEDULE_CALLBACK
– Screen where customers can book a callback.
PRODUCT_CART
– Cart page where customers can add products.
SCREEN_EVENT_LIST
– Screen listing all events.
SCREEN_RECENT_PRODUCTS
– Screen showing recently viewed products plus other products.
SCREEN_SCHEDULE_CALENDAR
– Screen where customers can select a date and time.
SCREEN_FAQ_VIEW
– Screen where customers can see frequently asked questions.
SCREEN_ASK_QUESTION_INPUT
– Screen where customers can post a question.
SCREEN_ASK_QUESTION_CONFIRM
– Confirmation screen after posting a question.
SCREEN_FAQ_SELECTIVE
– Screen where customers can select a video FAQ to play.
SCREEN_RETURNING_USER
– Screen displayed when the customer reopens the widget after a call.
SCREEN_SCHEDULE_SLOTS
– Screen where customers can view and select a time slot for scheduling a call.
SCREEN_EXPERTS_BUSY
– Screen displayed when all experts are busy.
SCREEN_VIDEO_CALL
– The video calling screen where customers can video call an agent.
SCREEN_CHAT
– Chat window where customers can chat with an agent.
SCREEN_REVIEW_AGENT
– Screen displayed after the call to review the agent.
SCREEN_SCHEDULE_WAITING
– Screen displayed after a call is scheduled and the widget is reopened.
SCREEN_INVITE_CALL_EXPIRED
– Screen displayed when a participant tries to join a group call that is no longer active.
Description: Triggered on auto capture / logged-in flow.
Payload:
{
"uid": "string",
"captured": "object"
}
Description: Triggered when the Popin widget opens.
Payload:
{
"uid": "string"
}
Description: Triggered when the Popin widget closes.
Payload:
{
"uid": "string"
}
All events include a uid
field that identifies the user session.
Payloads may vary depending on user input, permissions, and widget configuration.
Handle optional fields gracefully — they may be omitted if not provided by the user.