Cobrowse Cross-Domain

If you expect your Cobrowse sessions to involve interactions across multiple domains, additional configuration is required.

Setting up Helper Pages

To successfully navigate from one domain to another during a cobrowse session, the cobrowse script needs to open a “helper page” on the second domain, write a cookie to that domain, and close the helper. This must be done prior to the transition (see below for implementation options). The helper page will be visible to the visitor briefly, before being closed automatically.

Since the helper page must load completely, it is important that the page be as lightweight as possible, and it must contain the Glance cobrowse JavaScript tag. You can either choose an existing page on the domain to serve as the helper page, or you can use this page as a template:


  <title>Glance CB Page</title>
  <script id="cobrowsescript" type="text/javascript" src="" data-groupid="12345" data-site="staging" charset="UTF-8"></script>

    window.addEventListener("DOMContentLoaded", function() {
      window.setTimeout(function() {
      }, 100);
    // This is needed for IE 11, which opens a modal that
    // the user must click to accept before the page can be closed.


Be sure to replace the group ID number with your group’s number (in both locations) as well as the data-site value as appropriate.

Configuring Domains on your Account

Once you have settled on the helper page you are using for each domain, you need to configure the domains and helper page URLs in Glance. Glance will only allow session information to be passed to and from these trusted domains.

Follow these instructions to configure cross domain cobrowse:

  1. As an administrator, log in at
  2. Click on the Settings tab, scroll to the Cobrowse Settings section near the bottom, and click Manage Your Cobrowse Settings.
  3. Scroll down to the Cross-Domain Cobrowse section.
  4. Add each domain as well as a helper page.

For example: cross domain settings

Domains vs. Subdomains

If your website includes multiple "sub-domains" for the same domain, generally only the top level domain needs to be included. For example, if you have pages on and, you only need to add one entry for

An exception would be in the case where data-cookiedomain is specified in the cobrowse script tag in order to specify that the cookie be written on the subdomain. In this case, you would would use the subdomain specified in the data-cookiedomain attribute. So for example if your script tag has data-cookiedomain="" then you would need to add to the list of domains for cross-domain cobrowse.

NOTE: Both the original domain and the destination domain need to be listed. That is, if a session starts on and continues to, both and need to be listed here.

If you are navigating between domains with links in anchor tags, then your configuration work is complete.

NOTE: Glance Cobrowse Cross-Domain relies on a query string parameter in IE11. If the target of an anchor tag is a page which strips query string parameters, the session will not follow in IE11.

If you use JavaScript, not links, to redirect the visitor to a new domain, the Cobrowse script exposes an API GLANCE.Cobrowse.Visitor.continueSessionAt(), which can pass the session information on demand to the new domain. It is up to customers to call continueSessionAt() before any domain transition.

NOTE: This is typical in the use of JavaScript links or authentication redirects between domains. If the link clicked is not the end domain that the customer intends to move to or the end domain is unknown, i.e. dynamically generated through code, then this is the method that you will need to use.

On the page where the session is launched, use the continueSessionAt API call to write a cookie to the other domain(s). This can be done at any time before transition, although it is logical to do this either when the session starts or on the navigation event. See below for examples of each implementation.

Setting up Cross-Domain Cobrowse at Session Start

Creating cookies at session start time is recommended in situations where it’s difficult to identify the domain transitions and add the API calls as needed. In addition, if continueSessionAt() is not called synchronously with a mouse click or keystroke event, it can trigger a popup blocker.

The below code would be used to call continueSessionAt() at the start of the cobrowse session.

GLANCE.Cobrowse.Visitor.addEventListener("sessionstart", () => {
    destination: "",
    oncomplete: function() {
      console.log("Session continued on");
    iewarningsuppressed: true

Be sure to replace the “destination” with the destination domain, and delete/replace the console log as desired.

If additional domains need to be cookied, you must call a separate instance of continueSessionAt() for each domain.

Setting up Cross-Domain Cobrowse on Navigation

The below code is an example of calling continueSessionAt() at the time of the transition to the other domain.

This approach is desirable in situations where crossing domains happens infrequently and it would therefore be unnecessary to cookie the alternate domains every time a session is launched.

var redirect = function() {
  // First check to see if a cobrowse session is active
  // If not, proceed with the redirect as normal
  if (!GLANCE.Cobrowse.Visitor.inSession()) {
    window.location = "";
  // If a session is active, then call continueSessionAt
  if (GLANCE.Cobrowse.Visitor.inSession()) {
      destination: "",
      oncomplete: function() {
        // Use the oncomplete method to perform the redirect
        // once the cookie has been written
        window.location = "";
      iewarningsuppressed: true

window.addEventListener("load", event => {
    .addEventListener("click", redirect);

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