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

    0
  • 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");

    0
  • 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

    0

댓글을 남기려면 로그인하세요.

Zendesk 제공