Identifying visitors

Note: This guide applies only to the Chat widget from Chat-only accounts, not from Chat+Support accounts. See About Chat account types in Zendesk help.

You can use the API to identify certain groups of customers. For example, if you have customers subscribed to different membership plans, you might want to add tags so agents can see which plan visitors use. 


<script type="script/javascript">  $zopim(function() {  $zopim.livechat.setName('Logged in name');  $zopim.livechat.setEmail('[email protected]');  $zopim.livechat.addTags('Subscription_Plan');});</script>

The example uses the following methods:

  • $zopim.livechat.setName('Logged in name') - Replaces the visitor's name. Replace 'Logged in name' with your own name variable. 
  • $zopim.livechat.setEmail('[email protected]') - Replaces the visitor's email. Replace '[email protected]' with your own email variable. The form is filled in with your visitor's email -- very useful if you want to email the visitor if they leave halfway through the chat.
  • $zopim.livechat.addTags('Subscription_Plan') - Adds a tag to the visitor. Modify  'Subscription_Plan' to a string describing the service they use.

When a customer logs in to your website, have the methods identify your variables, then use the addTags() method API to tag customers accordingly.