Optimizing Chat and Web Widget (Classic) performance

Return to top
Have more questions? Submit a request

12 Comments

  • Matthijs Meijer

    Hi,

    I'm trying to use this setting but all it does is delay the loading of "chat-incoming-nootifaction.mp3".

    I'm using the following code:

    <script type="text/javascript"> window.zESettings = { webWidget: { chat: { connectOnPageLoad: false }, launcher: { chatLabel: { '*': 'Chat met ons!' } } } }; </script>

    Delay loading only the mp3 file has no, to allmost no effect on the page load.

    Am I doing something wrong?

    Regards,
    Matthijs

    2
  • Miranda Burford
    Zendesk Product Manager

    Hi Matthijs,

    Thanks for reaching out!  Right now, with this setting enabled, it will prevent the Web Widget from establishing a Web Socket connection on page load. The majority of the performance benefits for this feature are most noticeable in the Chat dashboard where agents are handling a large numbers of incoming requests from end users who are both either interacting OR not interacting with the Web Widget. With this new feature turned on, Agents will only be interacting with end users in the Chat dashboard once they have begun interacting with the Web Widget.  There are some benefits coming on the client side too.

    This work was needed as a precursor step to allow us to start dynamically loading Chat assets only once an end user begins interacting with the Web Widget as well. This should help to reduce initial bundle size and improve load times. This client side work to dynamically load the Chat assets hasn’t been completed yet but it is still on our roadmap for next year (sometime in the first half of the year).

    I'll log your details on our side and would be happy to notify you once this work has been completed.

    Thanks,

    - Miranda.

    0
  • Jon

    Miranda Burford I'm also interested in upcoming developments here too. We recently deployed proactive chat more broadly, and since we can't set connectOnPageLoad to false and have proactive working, we're stuck loading the widget's massive JavaScript (our total loaded JS is 5x larger overnight). This is definitely an issue for site performance an SEO.

    One suggestion - if there was a simple REST API we could use to determine if proactive chat was even worth loading, that would be a huge lifesaver. Many A/B testing platforms load optimally this way. First, a small request is made to an API with the URL of the current user, then if there's anything to do (e.g. there's an A/B test enabled for that URL, or in this case, if there are agents online and there are triggers that could be relevant for that URL), then the client can start loading more stuff.

    In other words, I wish we had an API that took a URL, and let us know if agents are online AND if any triggers could be active for that page. This way, we don't pay the loading price for proactive chat if it's not even possible at the time.

    Thank you!

    0
  • Miranda Burford
    Zendesk Product Manager
     
    Hi Jon,
     
    Thanks for your feedback! 
     
    >>In other words, I wish we had an API that took a URL, and let us know if agents are online AND if any triggers >>could be active for that page. This way, we don't pay the loading price for proactive chat if it's not even >>possible at the time.
     
    That's a good suggestion!  The additional context you've provided is helpful.  We'll definitely log that as a feature request on our side and be in touch if we have any updates on it in the future.  
     
    Thanks,
     
    - Miranda.
    1
  • Daniele Gabellini

    Hi Support

    If I use Web Widget only for "Contact forms" and NOT for "Chat", can I still enable the:

    connectOnPageLoad: false

    in order to improve performance site?

    Thanks

    0
  • DJ Buenavista Jr.
    Zendesk Customer Advocate

    Hi Daniele,

    Thank you for reaching out to Zendesk Support.

    In regards to your concern, the following performance benefits of using this code are mainly used in the Chat dashboard. This will help where agents are handling a large number of incoming chat requests and those who are interacting with the Web Widget.

    I don't see any issues using the following code since you will not be using chat or engaging with end-users from the web widget.

    Please don't hesitate to reach out if you have any other questions or concerns. Thank you and have a wonderful day ahead!

    Kind regards,

    DJ Buenavista Jr. |
    Customer Advocacy Specialist | Support@Zendesk.com

    0
  • Berto Alvaro

    We've implemented the suggestion but it loads intermittently or hangs with loading animation. Any idea what is wrong? This is our script:

    <!-- Start of tatcha Zendesk Widget script -->
    <script id=“ze-snippet” src=“https://static.zdassets.com/ekr/snippet.js?key=${KEY_VALUE}” defer> </script>
    <!-- End of tatcha Zendesk Widget script -->
    <script type=“text/javascript”>
    window.zESettings = {
    webWidget: {
    chat: {
    connectOnPageLoad: false
    }
    }
    };
    </script>
    0
  • Miranda Burford
    Zendesk Product Manager

    Hi Berto Alvaro,

    Thanks for your message.  Apologies for the short delay in my reply.

    The script looks OK, as is.  Would you mind sending over your website URL so we can see this in action and investigate further? 

    Thanks,

    - Miranda.

    0
  • Marcel Silva

    Ive also implemented the suggestion with the following script, but the chat button does not display at all when connectOnPageLoad is set to false. It only displays when set it to true.
    Id like to have the chat button displaying, but only actually connecting once user clicks the chat button.

     

    <script type="text/javascript">
    window.zESettings = {
    webWidget: {
    chat: {
    connectOnPageLoad: false
    }
    }
    };
    </script>
    0
  • Miranda Burford
    Zendesk Product Manager

    Hi Marcel Silva,

    Thanks for your message. 

    Would you mind sending over your website URL so we can see this in action and investigate further? 

    Thanks,

    - Miranda.

    0
  • Marcel Silva

    Hi Miranda,

    Thanks for replying,

    Is there an email I can send to you?

    Thanks

    0
  • Miranda Burford
    Zendesk Product Manager

    Hi Marcel Silva,

    Sure.  I just contacted you via email.  Please respond there and we can continue the conversation.

    Thanks,

    - Miranda.

    0

Please sign in to leave a comment.

Powered by Zendesk