← view more API documentation

api.chat.updateVisitorNickname

Add information to the visitor's nickname in the operator's buddy list. You can only set a 'snippet' of the nickname, since other extensions may be trying to update the nickname at the same time.

  • options.snippet the snippet of text to show as part of the nickname
  • options.hidesDefault (optional) set this to true if you want to hide the default nickname that Olark sets

Examples

To make the nickname look something like "Joe | USA (Palo Alto, CA) #1234", just add a snippet:

olark('api.chat.updateVisitorNickname', {snippet: 'Joe'})

Want to remove the default geolocation? Just use "hidesDefault":

olark('api.chat.updateVisitorNickname', {snippet: 'Joe', hidesDefault: true})

Discussion

Feel free to propose good uses for this method, or even drop us some suggestions for improvement! You can also join our mailing list to collaborate with other developers and get updates from us.