Hide Web Widget


3 댓글

  • Thomas de Silva

    Hi Lambo.

    Would you be comfortable exposing the full piece of code regarding the Widget, then I can take a look.

    #helpsome regards,
    Thomas de Silva

    Zendesk Consultant @ helphouse.io

  • Lambo Jayapalan

    Hi Thomas,
    That's pretty much the full piece of code:
    <script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=XXXXX"></script>
    <script type="text/javascript">zE('webWidget', 'hide');</script>

    Then elsewhere, I have other functionality to open the chat window where I call:
    zE("webWidget", "open");

  • Simon Blouner

    Hey Lambo,

    This is indeed possible. You can use the command "on close". Below is my explanation on how I did it.

    1. For some reason, the following code didn't work without actually c/p the Widget inclusion script in the header. So do this.

    2. Hide the widget from start, as you already do:
    zE('webWidget', 'hide');

    3. Implement button to open the widget in the state you want, like you already do:
    <button onclick="zE('webWidget', 'show')">Show Web Widget</button>

    4. The functionality of closing the widget completely once the end-user minimizes it, do the following: zE('webWidget:on', 'close', function() {
        zE('webWidget', 'hide');

    #helpsome regards,
    Simon Blouner
    Zendesk Consultant @ helphouse.io


게시물 댓글 달기가 중지되었습니다.

Zendesk 제공