This guide will show you how to use a JavaScript function to update Chatway visitor email and name .
To learn more about how to use JavaScript functions to add or remove Chatyway custom data, please check our easy visual guide here.
Updating visitor’s email address
$chatway.updateChatwayCustomData(’email’, ‘value’);
Example:
$chatway.updateChatwayCustomData('email', '[email protected]');
You can use this function to update the visitor’s email address by running it in your client’s browser console.
Updating visitor’s name
$chatway.updateChatwayCustomData(‘name’, ‘value’);
Example:
$chatway.updateChatwayCustomData('name', 'visitor01');
This function is also for updating your visitor’s name. Just run the function in your client’s browser console and will update your visitor’s name according to the entered value.
Don’t forget to check our entire Chatway knowledge base to make the most out of it.