HelpCrunch widget allows to collect your users’ data and use it inside your HelpCrunch account. You can pass the user’s data during the widget initialization (as we did with user authentication mode) or you can send it manually:
Update main user attributes
You can update main attributes of your customer at any time by calling an updateUser method:
var user = {
email: '<user email / email>',
name: '<user name / string>',
user_id: '<user id / string>',
phone: '<phone number / string>'
};
HelpCrunch('updateUser', user);
After you have added user’s data and called HelpCrunch('updateUser', user); this data will appear at your HelpCrunch admin account in chat with that user:
Add custom attributes to meet specific business criteria
In addition to the user’s name / email / ID, HelpCrunch lets you send additional attributes of your customers in custom data. You can do that by calling updateUserData method: HelpCrunch('updateUserData', userData);.
In userData you can send any information about users you wish to track as object of key/value pairs, that can contain numbers, strings or boolean data. This feature will only work if your user has a user_id attribute:
var userData = {
money_spent: 2500,
subscription: 'gold',
accepted_agreement: true,
};
HelpCrunch('updateUserData', userData);
Custom data parameters will appear in chat with user at your HelpCrunch admin account just as same as main user attributes (name, email, user id):
Also you will be able to search or filter your users by custom data at the “Contacts” page. There are 5 types of custom data you can search by: integer, float, string, boolean, datetime (example 2021-06-09T13:16:37+03:00)