Glance recommends referencing the Cobrowse script from the Glance CDN at cdn.glance.net. When you use the Glance CDN:
- Glance can easily provide you with updates and enhancements to the Cobrowse product.
- Changes made using the button customization tool will be automatically applied without involving your website development team.
You can, however, host the scripts on your own server if you prefer. Glance will provide upgraded scripts approximately once per quarter, and will support the current version and at least one version prior.
Glance provides a tool to help generate a single customized self-hosting package, which includes:
- The standard JavaScript, HTML, and CSS that is currently included in the self-hosting package.
- Your group's staging and production custom skin CSS file with your color and branding customizations.
- Your group's staging and production custom visitor text JSON files with customized widget text.
To host the script on your company website instead of accessing it from our CDN, you will need to:
Download the package by going to the Cobrowse Settings section of Account Management. Scroll down to the Self-hosting Package section.
- Each version of Cobrowse has its own unique package link.
- If you don't see a link for the version you are expecting, contact Glance Support.
For Cobrowse versions 6.3.0+, download the corresponding video package from
https://cdn.glance.net/video/packages/GlanceVideo_X.X.X.zip(Replace theXs with the same version number as the base package downloaded in Step 1).NoteThe video package is required even if your sessions are not using video.Unzip the contents of the packages and place them on your server. Place the base package from Step 1 in a folder named
cobrowseand the video package from Step 2 (if using Cobrowse 6.3.0+) in a sibling folder namedvideo.- The URL must contain the word "cobrowse" only once.
- For example, if you plan to host your files at
https://www.yourcompany.com/glance/then you would create the following folders:https://www.yourcompany.com/glance/cobrowsehttps://www.yourcompany.com/glance/video
Reference the location of the
GlanceCobrowseLoader_X.X.XM.jsfile in thesrcattribute of your script tag, as shown in the following example:
<script id="glance-cobrowse"
src="https://www.yourcompany.com/glance/cobrowse/js/GlanceCobrowseLoader_X.X.XM.js"
data-groupid="1"
data-site="staging"
charset="UTF-8">
</script>
Upgrade a Self-Hosted Script
Periodically, Glance releases updates to the Cobrowse JavaScript package. To upgrade your website to use the latest scripts, you will need to download a new package and put it on your website. The GlanceCobrowseLoader script in the new package is named with the new version number.
You have a few options for managing upgrades once you generate and download the new self-hosting package:
- Once a new release is available, update your website to point to the new version. In other words, in the script tag above, change the version number to match the version number you are upgrading to.
- Use a configuration setting on your website to control the version number, for example:
src="https://www.yourcompany.com/glance/GlanceCobrowseLoader_<%=GlanceCobrowseVersion%>M.js" - Copy the
GlanceCobrowseLoader_x.y.zM.jsscript to a generic name (GlanceCobrowseLoader.js) and reference that name in the scriptsrcattribute. You will need to make sure that your server applies appropriate cache headers so that visitors will be getting the latest version after you upgrade.