Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2014-10-10 19:32:35

dexter19
Member
Registered: 2014-10-10
Posts: 2

How to delay loading live chat ?

Dear All at forum!

I wanted to ask how can I delay loading live chat on my website. I tried to add setTimeout and it works fine but only when live chat is offline.
Please could someone resolve this for me, it would be much appreciated. I tried all options in live chat but cannot find anything to delay loading it.

Here is what I tried.

<script type="text/javascript">
        setTimeout(function() {

        var LHCChatOptions = {};
        LHCChatOptions.opt = {widget_height:340,widget_width:300,popup_height:520,popup_width:500};
        (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 = xxx/lhc_web/index.php/chat/getstatus/(click)/internal/(position)/bottom_right/(ma)/br/(top)/350/(units)/pixels/(leaveamessage)/true/(department)/1/(theme)/3?r='+refferer+'&l='+location;
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
        })();
            }, 1000);
    </script>

Offline

#2 2014-10-11 05:12:33

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: How to delay loading live chat ?

Why do you want that?
Perhaps you can try remove

po.async = true;

and try again

Offline

#3 2014-10-11 15:30:50

dexter19
Member
Registered: 2014-10-10
Posts: 2

Re: How to delay loading live chat ?

remdex wrote:

Why do you want that?
Perhaps you can try remove

po.async = true;

and try again

I want my website to load faster and also offer live chat help only for customers who spends for example 10-15 seconds on my website.


I have tried but it didn't help.

Please could someone provide solution?
Many thanks.

Last edited by dexter19 (2014-10-11 15:31:21)

Offline

Board footer