I have trouble understanding how hubspotutk cookie works.
Here is my use case:
When a user signs in in my app, I expect a hubspotutk cookie to be set in the browser. This works fine. Then the user logs out. When another user signs in on the same machine, same browser, I'd like him/her to be identified as another contact in hubsppot, and not the same as the previous user.
At the signin (and the signup, if it matters), I use the Forms API to interact with Hubspot.
What I expect:
When the second user signs in, another hubspotutk cookie is set, different from the cookie of the first user.
What I get:
When the second user signs in, the hubspotutk cookie of the previous user is used in the browser, even if I clear cookies between the two sessions. As a consequence, I have only one contact in hubspot that is a mix between the two users.
How it is implemented
In my app, I have the following tracking code in every page of my app:
After the signin, I call the Form API from my backend
Why do I have the same hubspotutk cookie between two sessions? Even when the second user is not logged and the cookies cleared, the hubspotutk cookie is magically restored when the user refreshes the page. How does hubspot associate this cookie to the machine? Is it via its IP address?
Anyway, how to handle the use case where several users use the same machine?
Thanks for any tip.