• Resolved DesignlabAmsterdam

    (@designlabamsterdam)


    Hi,

    On mobile the chatbox keeps on showing on every page. So visitors need to close the chat box on every new webpage they visit. How can we improve that?
    We prefer to keep the chat service on mobile.

Viewing 1 replies (of 1 total)
  • Hi there

    Thank you for getting in touch with us.

    Please go to ‘Live Chat’ -> ‘Settings’ -> ‘Custom Scripts’ and add the following JavaScript into the ‘Custom JS’ field:

    jQuery(document).on('wplc_animation_done', function(){
        var should_hide = Cookies.get('wplc_prevent_popup');    
        if( should_hide == '1' && typeof should_hide != 'undefined' ){
          jQuery("#wplc_hovercard").hide();
        } else {
            jQuery("#wplc_hovercard").fadeIn();
          jQuery("#wp-live-chat-header").addClass('active');
        }
        jQuery("#wp-live-chat-header").on("click", function(){
            if( jQuery(this).hasClass('active' ) ){
                var permanently_closed = Cookies.get( 'wplc_prevent_popup' );
                if( typeof permanently_closed == 'undefined' ){
                    Cookies.set('wplc_prevent_popup', 1, { expires: 1, path: '/' });
                }
            }
        }); 
    });

    This will prevent the hover card from showing up after the visitor has closed it.

    I hope this helps?

Viewing 1 replies (of 1 total)

The topic ‘start chat box keeps popping up when’ is closed to new replies.