feat: Add chatwoot:error sdk event (#3998)
This commit is contained in:
@@ -36,14 +36,18 @@ window.chatwootSettings = {
|
||||
})(document,"script");
|
||||
|
||||
window.addEventListener('chatwoot:ready', function() {
|
||||
console.log(window.$chatwoot);
|
||||
console.log('chatwoot:ready', window.$chatwoot);
|
||||
if (window.location.search.includes('setUser')) {
|
||||
window.$chatwoot.setUser('<%= user_id %>', {
|
||||
identifier_hash: '<%= user_hash %>',
|
||||
identifier_hash: 'a<%= user_hash %>',
|
||||
email: 'jane@example.com',
|
||||
name: 'Jane Doe',
|
||||
phone_number: ''
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
window.addEventListener('chatwoot:error', function(e) {
|
||||
console.log('chatwoot:error', e.details)
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user