question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ai_user cookie not present after reenabling the cookie

See original GitHub issue

My app (Vue) starts with the cookies disabled (disableCookiesUsage set to true). When the user consents cookies, the app enables the cookies (getCookieMgr().setEnabled(true)). After a breve navigation the ai_session is set but the ai_user is not. I recently moved to the lastest version of the package (from 2.5.X to 2.6.2). Is this an issue, somehting I am missing or just the ai_user is no longer used?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MSNevcommented, Jun 18, 2021

users and sessions are slightly different concepts. So with no user cookie the user would be considered to be effectively “anonymous” (same as if the user blocked cookies on the browser) and therefore they would be lumped together (I’m not sure how this is visualized in the portal) And the session is “refreshed” after around 30mins (depending on whether the user stays active)

In theory you could set the value yourself but that is not supported and will be potentially broken in a future release.

We already have a setAuthenticatedUser which you could possibly use as a fudge to workaround this (when stored in the cookie it is a session cookie) _self.setAuthenticatedUserContext = (authenticatedUserId: string, accountId?: string, storeInCookie = false) => {

I’m going to mark this Issue as an enhancement on the basis that we should add a new function suggestion setUserCookie to handle this scenario. Not currently sure on the timing of when this might get added.

0reactions
github-actions[bot]commented, Sep 14, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Managing Application Insights Cookies - Stack Overflow
Cookie initialization logic happens in Application Insights JavaScript ... item and checks if the cookie are not present, it creates them.
Read more >
AppInsights and European Law cookie policy - MSDN
If you onboard to AppInsights JS SDK, we add “ai_user” (persistent, expires after 1 year) and “ai_session” (session cookie) cookies.
Read more >
Cookie policy | Louis Poulsen
In order to prevent cookies from being stored on his terminal and browser, a user must disable them. TYPES OF COOKIES. There are...
Read more >
Cookies Policy - EMEA job opportunities at BD
This cookie policy is intended to inform website visitors how and why cookies are used by Becton, Dickinson, and Company (BD). The entity...
Read more >
Cookie Notice - H&M Group
You can at any time disable cookies that are not categorised as strictly necessary for the site to function by withdrawing your consent....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found