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:
- Embed Genesys Widgets into your website
- Configure your Genesys Widgets
- Setup Localization Options and Languages
- Styling Genesys Widgets
How to embed the CX Widget into your website
Unzip the Genesys Widgets package to your web server, and then locate the cx-widget.min.js file.
To embed the CX Widget, 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 CX Widget Javascript library that Genesys provides. You can host the library on your own web servers or on a Content Delivery Network (CDN). After the page has finished loading, the instrumentation script generates a new script tag to include the file on your web page.
Now you can configure the CX Widget and the products and services associated with it.
