How to hide chat/widget from non-logged in users?



  • Brett Bowser
    Zendesk Community Manager

    Hey David,

    One of our Community Moderators was able to provide some additional guidance on this topic here: Only Show HC Widget to signed in users

    If you have a team of developers available, you may want to get them involved to set this up. I'll also add this to our weekly digest to help provide visibility in case other users are able to offer up some additional code for you.


  • Mike Nicholls

    Hi there,

    I'm trying to implement the same thing, only presenting the chat launcher for signed in users.

    The page Brett's link points to looks to have been moved/removed.

    Kind regards

  • 이지훈

    hi. David Nguyen

    I'm surprised this code doesn't exist.
    If you put the code below in script.js, the chat widget will not appear for anonymous users.

      if (HelpCenter.user.role!=="anonymous"){
        zE('webWidget', 'show');
      // console.log('show');
        zE('webWidget', 'hide');
      // console.log('hide');
  • Brett Bowser
    Zendesk Community Manager
    Hey Mike,

    Thanks for sharing! This is the correct link I was trying to point to: Show web widget/answer bot only to signed-in users?
    I hope this helps!

Please sign in to leave a comment.

Powered by Zendesk