Revision as of 21:13, February 12, 2016 by KrisMcG (talk | contribs) (Genesys Widgets Deployment Guide)
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 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?

  1. Embed Genesys Widgets into your website
  2. Configure your Genesys Widgets
  3. Setup Localization Options and Languages
  4. Styling Genesys Widgets

How to embed the Genesys Widgets into your website

Unzip the Genesys Widgets package to your web server, and then locate the cx-widget.min.js file.

Copy and paste the following instrumentation script into your web page:

// CX-Widget Lazy Load Instrumentation Script
<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"});
</script>

To prevent the script from increasing your webpage load time optimizations, the instrumentation script includes itself during page load. After the page finishes loading, the instrumentation script adds a script tag to your web page. The script tag ID is genesys-cx-widget. You can modify the ID if required.

The following object is passed in with additional options:

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

Where src is the URL or path to the location of the Genesys Widgets Javascript library that Genesys provides. You can host the library on your own web servers or on a Content Delivery Network (CDN).

Now you can configure the Genesys Widget and the products and services associated with it.

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