How to 'deidentify' a user in an SPA which uses HubSpot Tracking Code
We have an SPA application where we have integrated HubSpot Tracking Code (https://developers.hubspot.com/docs/api/events/tracking-code). We useidentifyfunction to make sure tracking is tied to our logged in user. We then also calltrackPageViewwhenever the current URL changes within our SPA. That all works fine: page views get associated with the correct logged in user. Olehana Russia
Now, since it's an SPA, we do not reload the whole page browser when the user logs out from our app. This means that any subsequenttrackPageViewcalls get associated with the user who has already logged out.
So, the question is: how we 'de-identify' the user from HubSpot Tracking Code when he logs out from our application?