Custom Chat Widget tracking
Userlike provides custom tracking of Chat Widget events for customers that need a real-time overview on their chat utilization. For each configured Chat Widget, our system will trigger the provided callback URL for all events influencing its availability, e.g. when an Operator goes offline.
Using these events (listed below) and the related data we send with them, you can build powerful tools to monitor and report on your company's chat utilization.
Chat Widget configuration
To enable tracking for a specific Chat Widget, got to "Config > Widgets" and select the Chat Widget you want to track. In its settings, go to "Chat > Advanced" and enable the "Tracking callback" checkbox at the bottom of the page.
Provide your callback URL for this Chat Widget. We pre-generate a security token for you, but you can always replace it with one generated by yourself. Repeat this configuration setup for all Chat Widgets you want to track.
Please note that we'll try to validate the URL you provided with a POST request, including the security token in the header as follows: "API-SECURITY-TOKEN: [your token]". Make sure that your endpoint is prepared to accept this request and returns an "HTTP 2xx" code.
The following events are tracked for each configured Chat Widget and sent to the provided callback URLs.
|Triggered when Operators come online.|
|Triggered when Operators go offline.|
|Triggered when Operators set their status to "away". Also checked when Operators come online.|
|Triggered when Operators set their status to "active" again. Also checked when Operators come online.|
|Triggered when Operators' chat slot usage changes, e.g. when starting or ending a chat session.|
|Triggered when Operators' chat slots are all free, i.e. they have no active chat session. Checked for all Operator events.|
|Triggered when Operators' chat slots are all occupied, i.e. they can not accept another chat session. Checked for all Operator events.|
|Triggered when the Chat Widget can still accept new chat sessions, i.e. some Operators still have chat slots available. Checked for all Operator events.|
|Triggered when the Chat Widget can't accept new chat sessions, i.e. all Operators are offline, away or fully occupied. Checked for all Operator events.|
|Triggered when the Chat Widget is offline (with offline message form enabled) and a Webvisitor sends a message.|
Each callback will be in the form of a POST call to the provided URL, including the event-related JSON data in its body (described in more detail below).
Event data sent
Operator event data
For all Operator-specific events listed above, the callback's JSON body has the following structure:
Chat Widget event data
For all Chat Widget-specific events listed above (and Offline Message sent), the callback's JSON body has the following structure: