How to redirect user to custom page then user clicks on offline widget?

Last modification: 2014-06-30 17:41:59

Let say you want to redirect user to some page then your operators are offline.

You can do that by adjusting your embed code and appending redirect url. E.g

<script type="text/javascript">
var LHCChatOptions = {};
LHCChatOptions.opt = {offline_redirect:'http://google.com'};

(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
var refferer = (document.referrer) ? encodeURIComponent(document.referrer.substr(document.referrer.indexOf('://')+1)) : '';
var location  = (document.location) ? encodeURIComponent(window.location.href.substring(window.location.protocol.length)) : '';
//po.src = '//demo.livehelperchat.com/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(hide_offline)/true/(department)/4?r='+refferer+'&l='+location;
po.src = '//demo.livehelperchat.com/chat/getstatus/(click)/internal/(position)/bottom_right/(check_operator_messages)/true/(top)/350/(units)/pixels?r='+refferer+'&l='+location;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>

Support project

Developing application takes a lot of time. You can support application by donating. There is no company behind this application and it takes away my free time. Every donation matters and does not matter how small it is!


Paypal, one time donation
Monthly donation
Bitcoin
bc1q6gkl2hcwtn2g26em6axc7jehmn2hd9x8g7nzx9

USDT (Ethereum network)
0x45b92C4aa29EFD3252fD04fcDDe3e6Ef8b399D75