How to show the Web Widget On Click

Have more questions? Submit a request

8 Comments

  • Meghan Mahar

    Hi Anna. This may be exactly what I'm looking for. When the widget appears, will it show the widget button that users will need to then click or will the widget be open automatically?

    0
  • rjones

    Unfortunately, this merely hides the widget button then shows it. I'm also looking for a way to launch the widget without using the default button.

    0
  • rjones
    If you want to hide the button follow the steps given above but in Step 7. instead of 
    zE.show();

     use this:
    zE.activate({hideOnClose: true});

     
     
    0
  • Laksh Parab

    This requires to load widget script on every page, and then just show or hide on click event. Is there anyway to load widget from zendesk on click event and them immediately activate it?

    1
  • Eric Ypsilantis

    Laksh ended up following up in a ticket, but I wanted to share what I suggested here as well for those reading the article. We support the option to use Google Tag Manager to inject the embed snippet, per this documentation:

    https://developer.zendesk.com/embeddables/docs/widget/gtm

    So you would be able to use the "Fire On Step" logic in GTM to determine when to add the necessary embed codeblock and other custom code you wish to implement. I hope this helps out with your customization efforts!

    0
  • Laksh Parab

    @Eric But that will increase application dependencies on third party controls

    Krassmann, Konstantin has suggestion here

     

    I have not tried it.

    Solution: Dont forget to set the ID of the inserted script Tag ("ze-snippet")

    var s,
    r,
    t;
    r = false;
    s = document.createElement('script');
    s.id="ze-snippet";
    var head = document.getElementsByTagName("head")[0];
    head.appendChild(s);
    s.type = 'text/javascript';
    s.src = <your url with key>;
    0
  • Giladiskon Support

    Can anyone confirm whether the button link can open an active chat window or just show the widget button? Thanks.

    0
  • Brett - Community Manager

    Hi Giladiskon Support,

    There isn't a way to accomplish this natively, however, you may be able to set this up using the Chat API. I'd recommend you take a look at our Product Managers comment in the following post which addresses this: How to trigger a chat after the user clicks on the widget

    Hope this helps!

    0

Please sign in to leave a comment.

Powered by Zendesk