Here is the script you will need to use #
After creating the Website Chat Widget you will need to add the following code.
(function(d,t) {
var BASE_URL=”https://app1.chatcloud.ai”;
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=’https://chatcloud.b-cdn.net’+”/packs/js/sdk.js”;
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatcloudSDK.run({
websiteToken: ‘{{CUSTOMER_WEB_WDIGET_INBOX_WEBSITETOKEN}}’,
baseUrl: BASE_URL
});
window.$chatcloud.setUser(“{$user.id}”, {
name: “{$user.firstname} {$user.lastname}”,
avatar_url: “”,
email: “{$email}”,
identifier_hash: “{$user.id.hash=jFhExZWRX1VRkW5vFVp7toCz}”,
phone_number: “”,
description: “”,
country_code: “”,
city: “”,
company_name: “”,
});
window.$chatcloud.setCustomAttributes({
crm_contact_id: “{$user.id}”
});
}
})(document,”script”);
Replace {{CUSTOMER_WEB_WDIGET_INBOX_WEBSITETOKEN}} in the script with token from below. #
The website token that you get from creating the Website Widget Inbox and replace it in the code
Add the Script in the White Label Settings #
Paste the code in the White Label setting and you are good to go. This will help identify all your customers that try to reach out to you on support