JavaScript SDK
Configuration Options
Configuration options
Upscope's installation code has a Upscope('init', {});
 function that takes as second parameter a dictionary of options. Most of these can be set through the Upscope dashboard.
Some of these settings might not be available with your plan or might only be available if you have beta features enabled.
Please use the dashboard
Setting these values through the javascript is only encouraged if you can't set them through the dashboard as you have a specific use case where each page needs to behave differently.
Values set through the javascript will override your dashboard settings.
You can set most of these settings here.
Identifying the visitor
You can use these settings to identify the visitor within Upscope.
Option | Default value | Description |
---|---|---|
|
| A list of strings to identify the visitor by (e.g. |
|
| A list of strings to tag the visitor with (e.g. |
|
| A strings you uniquely identify the visitor by (e.g. |
Agent prompt
You can use show extra information about the Visitor to the Agent. This can also be used to show the Agent instructions on how to troubleshoot common problems with the specific page.
Option | Default value | Description |
---|---|---|
|
| A string of text containing information to be presented to the Agent about the Visitor. |
Additional configuration
These settings control how the session behaves on this particular page.
Option | Default value | Description |
---|---|---|
| (Set through the admin interface) | Whether to allow agents to change URL for the visitor. |
| (Set through the admin interface) | Whether to allow agents to click for the visitor. |
| (Set through the admin interface) | Whether to allow agents (who have the right permissions) to execute remote console commands |
| (Set through the admin interface) | Whether to allow agents to scroll for the visitor. |
| (Set through the admin interface) | Whether to allow agents to scroll for the visitor. |
| (Automatically set to your API key) | The API key of the account to connect to |
| (Set through the admin interface) | Whether to connect to Upscope server automatically. |
| (Default ringtone) | An mp3 of the ringtone for audio calls. |
| (Set through the admin interface) | Whether to take screenshots and record pageviews to show in integrations. |
|
| The color to use for the enlarged cursor. |
|
| Number of seconds of inactivity after which Upscope disconnects from the server. This only applies if a session is not active, and the connection is re-established when the tab regains focus, the cursor is moved, or the keyboard is used. |
|
| Refresh rate of the page. Set to 100 so changes are shown right away, but can be higher on websites where a lot changes constantly to avoid the agent's browser slowing down. |
|
| How long to keep agent drawings visible for. |
|
| Whether to show canvases while screen sharing. |
| (Set through the admin interface) | Whether to show the lookup code when the visitor presses the lookupCodeKey lookupCodeKeyRepetitions times. |
| (Set through the admin interface) | Message shown at the end of the session. |
|
| Whether to enlarge the Visitor's so it looks like the Agent's. |
|
| Whether try to get the identity of the visitor from the live chat configuration. |
| (Set through the admin interface) | Whether to inject a button in the lower left of the page to show the 4 digit lookup code. |
|
| Whether to integrate automatically with live chat systems. |
|
| Whether to change the live chat integration object to automatically include the watch link as a custom attribute. |
| (Set through the admin interface) | Pages on which to show the lookup code button (e.g. ['https://site.com/help/*']) |
| (Set through the admin interface) | Position of the lookup code button. |
| (Set through the admin interface) | CSS selector or HTML element object to replace text of with 4 digit lookup code. |
|
| Which keyboard key to show the lookup code with (17 is the Ctrl key). |
|
| Number of times the visitor needs to press lookupCodeKey to see the lookup code. |
| (Set through the admin interface) | List of CSS selectors (e.g. ['.credit-card']) to mask when screen sharing in addition to elements with a no-upscope CSS class. |
| (Set through the admin interface) | List of CSS selectors for elements where the agent should not have the ability to click / type. |
| (Set through the admin interface) | List of wildcard strings (e.g. |
| (Visitor's closest region) | Which Upscope region to connect to. |
| (Set through the admin interface) | Whether to ask for visitor authorization before screen sharing. |
| (Set through the admin interface) | Whether automatically change links to third party websites to make use of our proxy. |
|
| For Salesforce integration, the ID of the field we send the watch link to. |
|
| For Salesforce integration, the label of the field we send the watch link to. |
| (Set through the admin interface) | Whether to show the visitor a "Stop session" button. |
|
| An object that implements the Storage interface to use as storage for all Visitor data. |
| (Set through the admin interface) | Whether to track console content to display to the viewer. |
|
| Whether to use a device fingerprint to recognize the device cross-domain. |
Messages
These settings are mostly translations.
Option | Default value | Description |
---|---|---|
| (Set through the admin interface) | The text to display on the authorization prompt. |
| (Set through the admin interface) | The title to display on the authorization prompt. |
| (Set through the admin interface) | Message to show visitor when an audio call is initiated. |
| (Set through the admin interface) | This text will be shown to the visitor when they follow a call link. |
| (Set through the admin interface) | Message of prompt with the lookup code. |
| (Set through the admin interface) | Title of prompt with the lookup code. |
| (Set through the admin interface) | Translation for No. |
| (Set through the admin interface) | Translation for Ok. |
| (Set through the admin interface) | Translation for End Session. |
| (Set through the admin interface) | Translation for Yes. |
Functions
You can pass the following functions to further customize how Upscope behaves.
Option | Arguments | Return value | Description |
---|---|---|---|
|
| Boolean | Set to change the behavior of the remote control functionality. Return |
|
| Boolean (via callback) | Set to a function to change the look of the audio call ringing view. Return |
|
| Boolean | Set to change the behavior of the masking functionality. Return |
|
| Boolean | Set to a function to change the behavior of whether a particular URL leads to the Upscope proxy or not. Return |
|
| Boolean (via callback) | Set to change the behavior of the visitor authorization flow. Call the callback with |
|
| Boolean | Set to change the behavior of whether we get the content of a stylesheet from its rules, or whether we can proxy it's source from the server. Useful for libraries such as |