Revision as of 02:15, January 27, 2016 by Bfriend (talk | contribs) (Instrumenting your website)
Jump to: navigation, search

Genesys Widgets Deployment Guide

This guide provides the steps required to instrument your website with Genesys Widgets

Audience

This document is written for website developers who are in charge of the website code. You should have knowledge of HTML, JavaScript, and CSS.

How Do I Deploy Genesys Widgets?

To deploy Genesys Widgets:

  1. Instrument your website with Genesys Widgets
  2. Configure your Genesys Widgets
  3. Styling Genesys Widgets

Instrumenting your website

Unzip the Genesys Widgets package to your webserver and locate the file named cx-widget.min.js.

On your webpage, include the cx-widget.min.js script.

For example:

// CX-Widget Lazy Load Instrumentation Script
(function(d, s, id, o){var f = function(){var fs = d.getElementsByTagName(s)[0], e;if (d.getElementById(id)) return;e = d.createElement(s); e.id = id;e.src = o.src;fs.parentNode.insertBefore(e, fs);},ol = window.onload;typeof window.onload !="function"?window.onload=f:window.onload=function(){ol();f()}})
(document,'script','genesys-cx-widget', {src: "http://www.yourhost.com/path/to/cx-widget.min.js"});

This instrumentation will add a script tag to your web page after the page has finished loading. This prevents the script from increasing your webpage load time optimizations by including itself during page load.

This automated script tag is pre-set to add itself at the bottom of the web page with the ID "genesys-cs-widget". You may modify this value.

An object is passed in with some additional options:

{src: "http://www.yourhost.com/path/to/cx-widget.min.js"}

"src" here is the URL or path to the location of the CX Widget Javascript library provided by Genesys. You may host this on your own web servers or on a CDN. Enter the path to the file here and this instrumentation script will generate a new script tag that includes the file on your web page after the page has finished loading.

See the next section for how to configure the CX Widget and the products and services associated with it.

Comments or questions about this documentation? Contact us for support!