This guide will show you how to use a JavaScript function to add or remove Chatway tags for visitors/conversations.
Using the JavaScript function, you can add or remove tags for a visitor/conversation, based on your needs, for example after you’re done with a ticket, you can remove all tags assigned to it in one quick step instead of manually removing all tags.
To learn more about how to use JavaScript functions to add or remove Chatway custom data, please check our easy visual guide here.
- Add tags to a visitor/conversation
The function is: $chatway.addChatwayTags(‘value’); – where you need to replace ‘value’ with the tag value of your choice, e.g. “sales”:
Example:
$chatway.addChatwayTags('Sales');
You can use this function to update a visitor/conversation tag to “Sales” by running it in your client’s browser console and will add a tag to this visitor/conversation according to the entered value.

2. Remove tags to a visitor/conversation
The function is: $chatway.removeChatwayTags(‘value’); – where you need to replace ‘value’ with the tag value of your choice, e.g. “sales”:
Example:
$chatway.removeChatwayTags('sales');
You just have to run the function in your client’s browser console and it will remove the tag in question to this visitor/conversation.
You can also remove several tags by running this function in your client’s browser console.
For example:
$chatway.removeChatwayTags('['value1', 'value2', 'value3']);
And that’s it! Don’t forget to check our entire Chatway knowledge base to make the most out of it.