This short document provides the instructions to load the SnapEngage library after your page content has been loaded and rendered. It is intended to our customers with advanced development skills as it will requires some JavaScript scripting custom integration in your page.

In this mode, we do not display our Help tab on the side, as our advanced users usually do their own user interface integrated in the web application.

Adding the required DIVs

The first step is to add these static DIVs in your page, just before the </BODY> tag (where you had the SnapEngage code before):

			<div id="SnapABug_W"></div>
			<div id="SnapABug_WP"></div>
			<div id="SnapABug_Applet"></div>
			

Loading the library

Then load the JavaScript library whenever you are ready in your JavaScript code. This usually depends on your JavaScript framework. The library URL is either

http://snapabug.appspot.com/snapabug.js
if you are using http for your page or
https://snapabug.appspot.com/snapabug.js
if you are on https (SSL).

Initialization

Once the the library has been loaded, call the init code as follow:

			SnapABug.initAsync('your widget id');
			
You can get your widget id here

User interface

From your user interface, to open the SnapABug default form, just call:

			SnapABug.startLink();
			
If you want to start a chat directly, call this function instead:
			SnapABug.startChat('Hello, how can I help you today?');
			
If you only want to use the proactive chat, you do not have to add user interface controls to start the forms.