Listening for Events
You can listen for events by running the following code:
upscopeManager.on(event: .eventName) { data in
// Handle event
}
List of Events
| Event Name | Additional Arguments | Description |
|---|---|---|
beginSession | — | A session has started. |
continueSession | — | A session is continuing from a previous app launch. |
endSession | — | A session has ended. |
stopSession | — | The session was stopped by the visitor. |
newObserver | observerId: String, observer: { id: String, name: String?, screenWidth: Int, screenHeight: Int, windowWidth: Int, windowHeight: Int, hasFocus: Bool } | Indicates a new agent is observing. |
observerUpdate | observerId: String, data: [String: String] | An observer's data has changed. |
observerGone | observerId: String | observerId is no longer observing. |
observerContentVisible | observerId: String | observerId can now see the content (it is no longer loading). |
observersCount | count: Int | Provides an accurate tally of the number of people currently observing. |
customMessage | message: String | A custom message sent by an observer or visitor. |
callStart | callId: String | An audio call has started. |
callAccepted | — | An audio call has been accepted by the visitor. |
callEnd | — | An audio call has ended. |
