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

Arguments

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

Notes

Important Note:
updateVisitorNickname is best used to display visitor information other than name and email in the buddy list. To display a name and/or email in the buddy list use api.visitor.updateFullName and api.visitor.updateEmailAddress respectively.

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.

Highlight AdWords referrals in your visitors list

Let’s say you want to highlight valuable visitors in your buddy list. For example you have already paid money for a visitor to click on your AdWords campaign, or when they search for the term “buying widgets”:

<script>
olark('api.visitor.getDetails', function(details){

    if (details.referredByPaidAdvertisingThisVisit) {

        olark('api.chat.updateVisitorNickname',{
            snippet: "AdWords Referral"
        })

    } else if (details.searchTextForThisVisit == "buying widgets") {

        olark('api.chat.updateVisitorNickname', {
            snippet: "wants to buy a widget"
        })

    }

});
</script>