JavaScript SDK
SDK Functions
Here's a list of all the functions supported by Upscope's SDK.
These can be called with Upscope('FUNCTION_NAME', ...args);
.
Function name | Arguments | Description |
---|---|---|
| — | Stops and Agent request. |
| — | Starts the socket connection to the Upscope servers. |
|
| Returns the lookup code through the callback. |
|
| Returns the Visitor's shortId through the callback. |
|
| Returns the watch link through the callback. |
|
| Used to initiate Upscope. This must be the first function called. |
|
| Logs a new event in the history of the visitor. |
| — | Triggers a new pageview in a SPA environment. |
|
| Adds a listener for the events provided. |
|
| If a Session is active, it will redirect the visitor to the provided URL through the Upscope proxy, otherwise it will send the visitor directly to the URL. |
| — | Initiates an Agent request. |
|
| Used to reset the connection with Upscope and clear all identity from the Visitor. A new Visitor will be generated with a fresh ID. If |
| — | Persists the visitor's history and screenshots to Upscope's servers. |
| — | Terminates an active Session. |
|
| Submits a user rating after a Session has ended. |
|
| Used to update the identity of the visitor or settings after pageload. |