Loading the JavaScript library provides an MagicWidget JavaScript object that responds to a few methods. These allow you to update users without a page refresh and interact with the messenger window.
Installation
Open the pages where you want to implement the widget, and add the following code close to the end body tag (</body>).
<script type="text/javascript">
var scriptElement = document.createElement("script");
In the example above we have appended the script tag to the body with async enabled. This is recommended so that the rendering of your website is not blocked by the script. However, you will need to know when the script is done downloading and the widget is ready. This can be done by adding the following callback function to the window object which the widget will invoke when it's ready.
window.magicWidgetAsyncInit=function(){
// magicwidget is ready!
}
The widget requires a configuration object to initialize.
Parameter
Obligatory
Type
Description
community
Yes
String
Name of your Socialboards Inbox
moduleMask
Yes
Integer
A bit mask to enable modules. 1 = FAQ, 2 = Chat, 4= Form.