Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Visitor chatbox

JonH edited this page Jun 16, 2015 · 3 revisions

Adding the visitor chat box to your pages

LCSK displays a small div box on the bottom-right of web pages allowing visitors to easily ask for help / chat with agents regarding your product.

You'll need the following script tags for the chat box to appear.

<script src="/lcsk/assets/js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="/lcsk/assets/js/jquery.signalR-2.1.1.min.js" type="text/javascript"></script>
<script src="/signalr/hubs" type="text/javascript"></script>
<script src="/lcsk/chat.js" type="text/javascript"></script>

Note: the /signalr/hubs source is automatically generated by signalr. It is created on the fly and many IDE's signal this line of html as missing a source file. Ignore this warning and keep this script reference on your page.

One very important part here is that you will need a reference to the jQuery library before adding the script tag of SignalR, order is important here so ensure jquery is defined followed by SignalR.

Once you have added these tags, a small chat box will be displayed on the bottom-right of the page. If for any reason you do not see the chat box, check your browser's developer tools window / console to ensure there are no javascript issues. Also we've found it helpful to ensure you've cleared any cache / history / cookies when it comes to .css / .js files, so please also try this.

Clone this wiki locally