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');s.id='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(...