In case this helps anyone. I figured it out.
My code was correct. Just missing in the JS the Token I was passing the entire array including Keys instead of just the token.
The line read:
console.log('<?php echo $response ?>');
console.log('<?php echo $current_user->user_email?>');
window.hsConversationsSettings = {
identificationEmail: '<?php echo $current_user->user_email?>',
identificationToken: '<?php echo $response ?>'
};
window.hsConversationsOnReady = [
() => {
console.log('OnReady');
window.HubSpotConversations.widget.load();
},
];
It should read:
<script type="text/javascript" id="passUserID">
window.hsConversationsSettings = {
loadImmediately: false,
identificationEmail: '<?php echo $current_user->user_email?>',
identificationToken: '<?php echo $response['token'] ?>'
};
window.hsConversationsOnReady = [
() => {
console.log('OnReady');
window.HubSpotConversations.widget.load();
},
];
</script>