Start and Close chat events

To execute own javascript code when chat is started or closed, you can customize chat button integration code (with bold is marked our customization, the rest of the code is standard chat button integration code):

<script type="text/javascript">

(function(d, src, c) { var t=d.scripts[d.scripts.length - 1],s=d.createElement('script');'la_x2s6df8d';s.async=true;s.src=src;s.onload=s.onreadystatechange=function(){var rs=this.readyState;if(rs&&(rs!='complete')&&(rs!='loaded')){return;}c(this);};t.parentElement.insertBefore(s,t.nextSibling);})(document,



var mybutton = LiveAgent.createButton('4c1d0e9f', e);

mybutton.oldOnClick = mybutton.onClick;
mybutton.oldOnCloseFunction_ = mybutton.onCloseFunction_;

mybutton.onClick = function() {
     //here is your code after chat is started, e.g. measure the size of chat window:

mybutton.onCloseFunction_ = function() {
     //put here your javascript code executed after chat is closed



Ready to try LiveAgent?

It's free for the first 14 days! No credit card required.

Get Started
We work well with others...
Magento Joomla Wordpress Mailchimp
Contact us

+1-800-811-6590 (Toll Free in USA & Canada)

+421 2 33 456 826 (European Union & Worldwide)

Quality Unit, LLC 616 Corporate Way, Suite 2-3278 Valley Cottage, NY 10989

Stay in touch
Blog Google+
© 2004-2020, All rights reserved