How to activate unblu using the snippet and activation elements (without using the API)

Click here if you want to download the full example shown below: jsc-8.zip

This is an example html page where the snippet is included. unblu sessions are started using the unblu activation elements. There are four different activation elements which are here integrated into a simple web page. The web page is only there to 'hold' the elements. In order to gain any benefit from these samples a developer might want to isolate each element and check what happens after clicking the element(s). For example, if you want to know what happens when you terminate a session, click on the 'Click to terminate the session' link and analyze the behavior to offer a clue as to how you might integrate these elements into your own web pages.

Note: All of the file/object/function names can be changed according to your needs.

  1. Create an HTML page.
  2. Create a JavaScript file called 'snippet.js' and paste the snippet into it. The snippet can be found in your account at www.unblu.com. (unblu.com -> myunblu -> administer account -> integration section.)

    Keep in mind that the snippet should be placed after the last meta tag in the head section, but before any other script. All of the other JSAPI consuming scripts must only appear after the snippet.

  3. Include the snippet in your HTML file inside the head tag (using the appropriate location of the actual 'snippet.js' file within your project tree)

<script type="text/javascript" src="js/snippet.js"></script>

Following these steps you can use all of the activation elements that we currently support.

The activation element below activates a dialog with two options; chat or co-browsing.

<a id="unblu_activation_element_start" href="#">Click to start</a>

The activation element below uses a token to start a session.

<a id="unblu_activation_element_token" href="#">Click to start co-browsing</a>

The activation element below is used to invite someone for co-browsing.

<a id="unblu_activation_element_invitation" href="#">Click to invite someone for co-browsing</a>

The activation element below is used to terminate an active session.

<a id="unblu_activation_element_termination" href="#">Click to terminate the session</a>

  • deploycloud
  • deployonprem

results matching ""

    No results matching ""