Add Cobrowse to Your Website

For your convenience, Cobrowse generates a customized script tag for your account that you can copy and paste into your company website.

Find your Cobrowse Script Tag

For your convenience, Glance generates a customized cobrowse script tag for your account that you can copy and paste into your company website

To find your Cobrowse script tag:

  1. Go to and click My Account.

  2. Log in to your account using your Glance Address and Password.

  3. Under Manage Your Account, click the Settings tab. The settings tab.

  4. In the bottom left corner of the Settings tab, click on Manage your Cobrowse settings. The script tag section will be displayed at the top of the page. The settings tab.

NOTE: Your Cobrowse script tag includes your company's unique Group ID. If you have multiple Glance groups, make sure when you are testing that the correct Group ID is in the tag, and that you are joining sessions as a Glance user in that group.

Script Tag Versions: Staging and Production

There are two versions of the script tag: one for your staging website, and one for your production website. Which profile of Cobrowse is used on your site is specified by the site attribute in the script tag. You should use Staging for your own internal staging environment and Production for your live site.

NOTE: Cobrowse will not work on a website accessed at localhost with the file://protocol. If you are trying out Cobrowse on a local website, please access it via a host name added to your local hosts file or equivalent.

Customize the Script Tag

Glance recommends that you start with the script tag provided in your account settings, then customize as needed using the parameters documented below.

The format of a customized Cobrowse script tag is this. Please replace the items in [square brackets] with appropriate values for your account and application.

<script id="glance-cobrowse" type="text/javascript"
  data-termsurl="[terms and conditions url]"
  data-cookiedomain="[session cookie domain]"

NOTE: The script tag src url must be an https url to ensure the integrity of the JavaScript file.

Once a session is in progress, any tagged pages that the visitor navigates to will be included in the session. Pages without the script tag will not be included in a session and will appear to be "paused." This is shown by the screen darkening on the agent side, as if the visitor has navigated to another website or closed the browser tab.

Attributes in the Script Tag

View descriptions of each attribute in the script tag here.

Use a Meta Tag for Attributes

In some environments, it is not possible to add arbitrary attributes to a script tag. Cobrowse parameters can alternatively be specified in a meta tag.

For example:


If you are hosting the script on your own server, add the attribute data-scriptserver which tells Glance where to find the additional script and CSS resources that you host.

For example:


Manage Tags

The Glance Cobrowse script works with tag management systems such as Tealium and Ensighten and can be added to the page after the page load if desired. If adding the script tag dynamically, the following is the best cross-browser approach:

  1. Create the script element and set all attributes except the src attribute.
  2. Add the script tag to the document.
  3. Set the script tag src attribute.

Self-Hosting Scripts

Learn more about hosting scripts on your own server here.

Add the Script Tag

Once you are finished customizing your script tag, Cobrowse requires the script tag to be added to all pages within the website that will be viewable to the agent during a session. All, or some, pages of a website can be instrumented with the Cobrowse script tag. Since most websites are architected with a template used to generate some or all pages, the template is the appropriate location to add the Cobrowse script tag.

Additionally, if your IT Web Development team utilizes a tag management tool (Google Tag Manager, Tag Commander, SuperTag, etc.), you may use this to deploy the Cobrowse tag in the head section of the webpages. However, some tag managers (Google Tag Manager, Ensighten, etc.) may not allow you to add attributes to a javascript tag as in the previous examples.

To work around this, you can implement your tag into two separate sections: the meta attributes tag and the JavaScript loader tag. The meta attributes tag will include all the attributes needed (data-groupid, data-site, data-scriptserver) as well as all the optional attributes you might want to use (, data-inputelements, etc.). The JavaScript loader tag will provide the link to your group's Cobrowse script with the appropriate version. The meta tag must come first. If not, you will see a "data-groupid missing" error in the console.

An example looks like this:

<!--Meta Attribute Tag:-->
<meta id='glance-cobrowse' data-groupid="00001" data-site="staging">

<!--JavaScript Loader Tag:-->
<script id="cobrowsescript" type="text/javascript" src="" charset="UTF-8"></script>

The script tag must be included on the page itself, as well as within certain iframes.

If using a script tag only, the id must be glance-cobrowse. If using a meta tag and a script tag, the meta tag id should be glance-cobrowse and the script tag id should be cobrowsescript.


Iframes must also include a script tag, unless one of the following conditions apply:

  • The iframe is dynamically built using JavaScript.
  • The hostname and protocol of the iframe match the parent. For example, the parent is at, and the iframe is also at

If the parent is at and the iframe is at, the iframe must have its own script tag. Also the iframe URL protocol, HTTP or HTTPS, must match the parent.

If your site contains iFrames of third-party content, you must add the third-party site to the Trusted Sites list.

NOTE: Always embed the script tag via https to ensure the integrity of the JavaScript file.

In the above listed cases, Glance is able to automatically include the iframe in the Cobrowse session.

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