Note: This is a jQuery example.
This is an example of how to automatically open the chat window after a number of seconds. It also remembers the user so it does not happen on all pages the user loads. Only the first time.
You should use this in cases where you want more activity from your users, by showing them the possibility of direct chatting with you. You can setup many reactions in Settings under the backend administration interface, e.g. auto start the chat session, don’t show the chat when you are offline, and more.
The 30*1000 is the number of milliseconds, which correspond to 30 seconds. It sets a timeout when the page DOM has been loaded, and when the timeout is reached it calls openChat().
The openChat() function will open the chat only if the chat has been loaded, and the cookie has not yet been set.
Note: Cookie functions are just standard W3School examples, taken from http://www.w3schools.com/js/js_cookies.asp