Attributes in the Script Tag

Descriptions of required and optional script tag attributes.

group: Your assigned Group ID number provided by Glance.

Site: Two site options:

  1. staging – testing
  2. production – live

This allows Glance to push newer versions of the script tag to your staging site for testing before deploying to production.

Required Attributes

data-groupid: Same as group in the src attribute.

data-site: Same as site in the src attribute.

Optional Attributes

data-ui: See Default vs. Custom UI.

data-termsurl: A URL pointed to your terms and conditions page for the Cobrowse service. This is only required if you are using Cobrowse’s built-in terms and conditions window. Alternatively, this URL can be specified in the button customization tool. (See Style the Glance Cobrowse Button.)

data-inputevents: Maps input events to Glance Cobrowse actions. The data-inputevents format is:

{ “[modifier]-[keycode]” : “[Glance action]”, …}

For example:

data-inputevents='{"ctrl-13" : "startSession", "ctrl-9" : "toggleButton"}'

This above example indicates that pressing Ctrl+Enter should start a session and Ctrl+Tab should toggle the visibility of the Cobrowse button. Allowed modifier keys are Shift, Ctrl, and Alt. The key code may be any standard JavaScript key code. See Create and add a link or button to your web page for a list of Valid Glance Cobrowse Actions.

NOTE: Please use single and double quotes exactly as shown in the above example. The outer quotes around the attribute value should be single quotes, and the quotes within the attribute value must be double quotes.

Customers should still provide a link or button in addition to the key combinations to allow for starting sessions on mobile devices.

data-cookiedomain: The domain to use for the Cobrowse session cookie. This setting is typically required only for staging sites hosted on a public suffix domain such as or Specify the full host name as the cookie domain. For example, if your staging site is, specify data-cookiedomain=””

data-cookietype: The type of cookie to use for the Cobrowse session. Possible values include the following:

  • normal (default): A non-secure cookie on your website domain. Use this value if visitors need to be able to navigate to insecure pages during a Cobrowse session.
  • secure: A secure cookie on your website domain. You may use this value if visitors will only need to be able to navigate to secure pages during a Cobrowse session.
  • ls: Local storage on your website domain. You may use this value if you would like to avoid adding a cookie to your domain, and if your visitors only navigate to pages on the same local domain.
  • dual: Both local storage and a cookie are used. Use this value if you have existing code which may delete cookies on your website domain, including the Cobrowse session cookie.

data-startpaused: Allows you to start the session in a paused state. Must be set to data-startpaused="1"

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