We have Hubspot Livechat running on an AngularJS SPA. I have two separate issues that we require some advise on if possible:
Scenario 1
When a user logs out of our app, we call revokeCookieConsent, which clears messagesUtk. However the issue we are experiencing is that when if the person remains on the same browser session and logs in as the same user (or a new user), the messagesUtk remains unset. This means that our Hubspot identifcation doesn’t function (even if we execute the code for it). So when that same user sends a message to us via Livechat, they are labelled in the Inbox as an unknown visitor.
When the page is refreshed on the browser, some code is executed that sets messagesUtk with a new value**.** However since we use an SPA, we want to programatically execute the same function? Is this possible?
Scenario 2
revokeCookieConsent appears to correspond to cookie consent banner being reset. However how do we achieve the case where:
- A Hubspot identified user who has previously accepted cookies user logs out of my app
- We de-identify/unassociate them from their Hubspot chat using revokeCookieConsent
- The user does not have to accept hubspot cookies again when they return to our app