Self-Hosted Scripts

Glance recommends referencing the Cobrowse script from the Glance CDN at glancecdn.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.

To host the script on your company website instead of accessing it from our CDN, you will need to:

  1. Contact Glance to retrieve the latest Cobrowse script.

  2. Unzip the package onto your web server.

  3. If you have customized your Cobrowse button using the button customization tool, download your custom skin CSS files into a customstyles directory of the unzipped package. Your custom skin files can be found at the following URLs (specify your unique group id in place of [groupid]):

  • www.glancecdn.net/cobrowse/customstyles/CustomSkin_[groupid]_S.css
  • www.glancecdn.net/cobrowse/customstyles/CustomSkin_[groupid]_P.css.

NOTE: When the Cobrowse script is self-hosted, the script tag src attribute should reference the GlanceCobrowseLoader script as it is hosted on your company website.

script id="cobrowsescript" type="text/javascript"
src="<b>https://www.yourcompany.com/glance/GlanceCobrowseLoader_xxx.0M.js</b>"
data-groupid="0001"
data-site="staging"
charset="UTF-8">
</script>

NOTE: None of the other scripts, images, or style sheets in the package should be referenced in your website.

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 couple of options for dealing with upgrades:

  1. 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.

  2. Use a configuration setting on your website to control the version number, for example: src=”https://www.yourcompany.com/glance/GlanceCobrowseLoader_<%=GlanceCobrowseVersion%>M.js“

  3. Copy the GlanceCobrowseLoader_x.y.zM.js script to a generic name “GlanceCobrowseLoader.js” and reference that name in the script src attribute. 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.

By continuing to use the site, you agree to the use of cookies. Learn More