Is it possible to delay the chat widget from popping up?

Return to top
Have more questions? Submit a request

10 Comments

  • Vadim Eremeev

    Another way is to wrap initialisation code into delay function like below

     

    function showzopim() {
    <!--Start of Zopim Live Chat Script-->
    ....
    <!--End of Zopim Live Chat Script-->
    }

    setTimeout(showzopim,5000);
    0
  • Ricardo
    Zendesk Community Team

    Thanks for the addition, Vadim!

    0
  • idanrs

    With all due respect I don't understand where exactly do I have to add this script.

    The script I implemented in the head of my site is:

    <!-- Start of idan Zendesk Widget script -->
    <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=6a17b045-44e8-4157-aa4a-c5d42b7bb5c8"> </script>
    <!-- End of idan Zendesk Widget script -->

    Do I have to add the script you described above to the page head too?

    Or is it going somewhere else?

    If it's going somewhere else, could you be very explicit where exactly?

    Thanks.

    0
  • Brett Bowser
    Zendesk Community Team

    Hi idanrs,

    If you'd like this widget to display on all pages in your website, you'll paste it into the document head of your theme. If you'd only like the widget to display on certain pages, then you'll paste the code snippet on that particular page on your website.

    If you're still having troubles locating where this should be pasted, can you clarify if you're trying to include the widget in your Zendesk Help Center or external website?

    Thanks!

    0
  • sum

    Hi,


    I just implemented the same, and it worked well. Thanks for the code. I have faced the issue that the widget is showing when offline. I want to hide the widget when offline. Since we forcefully showing the widget $zopim.livechat.window.show() so that the $zopim.livechat.button.setHideWhenOffline is not working any more.

    Also is there any method to check the status?

     

     

    0
  • Brenda Cardinez
    Zendesk Customer Advocate

    Hi Sumith,
    To hide the widget when offline, you will just need to make sure that the offline form is deactivated from your Chat Widget settings, Forms tab. Please take note that the chat widget status depends on your Agent Status in the Chat dashboard.
    Hope this helps! Thanks!

    0
  • Giulio Orsi

    Hi, I tried this solution to delay the loading of the chat on the site, it works, the only thing that then shows it open and not closed. There is a way that to show closed chat after loading otherwise it becomes invasive.

    0
  • Shai Sy Dimayuga
    Zendesk Customer Advocate

    Hi Guilio,

    Hope you are well.

    If you would like to show only "chat button" after delaying the chat widget from showing up, you can then replace the "$zopim.livechat.window.show()" to "$zopim.livechat.button.show()" instead.

    <script type="text/javascript">
    var bool = true;

    $zopim( function() {
    bool = $zopim.livechat.isChatting();

    if(bool==false) {
    $zopim.livechat.hideAll();
    setTimeout(showzopim,60000); //time in milliseconds - 60 seconds = 60000


    function showzopim() {
    $zopim.livechat.button.show()
    }
    }
    });
    </script>
    0
  • Eduardo Cabrera

    So, the whole thing ends like this on the <HEAD>?

     

    <!-- Start of ghostfiregaming Zendesk Widget script -->
    <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=XXXXXXX-XXXXX-XXXXXXXXX> </script>
    <script type="text/javascript">
    var bool = true;

    $zopim( function() {
    bool = $zopim.livechat.isChatting();

    if(bool==false) {
    $zopim.livechat.hideAll();
    setTimeout(showzopim,60000); //time in milliseconds - 60 seconds = 60000


    function showzopim() {
    $zopim.livechat.window.show()
    }
    }
    });
    </script>
    <!-- End of ghostfiregaming Zendesk Widget script -->

    0
  • Venn Villanueva
    Zendesk Customer Advocate

    Hi Eduardo,

    I can see that you have already submitted a ticket about this. I'll go ahead and respond via ticket so we can move forward on your request. Thanks!

    0

Please sign in to leave a comment.

Powered by Zendesk