Reputation: 395
I'm trying to integrate Azure Insights telemetry with our SPA and trying to add authenticated user tracing. For this, after logging in, I call ReactAI.ai().setAuthenticatedUserContext(user_id)
. I can see the user_id on that specific trace, but not on subsequent ones. If I grab the session id in that trace, I can reconstitute the user journey, but would ideally like to not go through the extra step of figuring out the session id.
Upvotes: 1
Views: 1332
Reputation: 2679
The full signature of the method would be:
setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false)
You would need to set storeInCookie
to true to make sure UserId is preserved across traces.
This cookie was marked as non-essential upon cookies review as per the new cookie laws and could not be an on-by-default cookie. I think you'd need "Cookie statement" on the site if you'd drop this.
Upvotes: 1