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

Answered

4 Comments

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

    Cheers!

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

    0
  • 이지훈

    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.

    $(function(){
      if (HelpCenter.user.role!=="anonymous"){
        zE('webWidget', 'show');
      // console.log('show');
      }else{
        zE('webWidget', 'hide');
      // console.log('hide');
      }
    });
    0
  • 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!
    0

Please sign in to leave a comment.

Powered by Zendesk