Make chat widget available for certain ORG tags


5 コメント

  • Fernando Duarte
    コメントアクション Permalink

    Here's a script that you can use on your website to show the widget on selected customers only

    <script type="text/javascript">

    if(HelpCenter.user.tags.indexOf('vip_chat') > -1)
    { //Checks to see if a certain tag is associated with the logged-in user
    console.log('I have the tag');
    window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= d.createElement(s),e=d.getElementsByTagName(s)[0];
    z.set=function(o){z.set. _.push(o)};
    z.t=+new Date;
    $. type='text/javascript';


  • コメントアクション Permalink

    Hi David,

    If you want to simply suppress the chat feature of the web widget, but leave other options available (if you have them), you could use the following:

    <script type="text/JavaScript">
    window.zESettings = {
    webWidget: {
    chat: {
    suppress: true

    If you want to hide the whole widget you can do that too:

      zE(function() {

    If you're using the chat widget (not the web widget) you can hide that too, like this:


    $zopim(function() {


    I haven't included the conditions for suppressing/hiding the elements because you appear to have that part covered (also I wouldn't know where to begin with that ;))

    Hope that helps you out.

  • David
    コメントアクション Permalink

    Thanks for the suggestion Jacob!

  • Amanda Oka
    コメントアクション Permalink

    Hello @fernando,

    Is it possible to include multiple user tags?  Maybe switch out 'if' with a Case?  We're trying to show our chat only to users within certain countries (users are tagged with country code).  Will your example still work?  Or would I need to duplicate this for each tag?

    Also, the Account Key, is that a token or our account domain?

    Thank you,


  • Brett - Community Manager
    コメントアクション Permalink

    Hey Amanda,

    It looks like you have a ticket open with our Solutions Consultants team regarding this. If you don't get any assistance here from the community we will continue working with you in the ticket :)




Powered by Zendesk