-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(browser): Update docs for setUserId() + session handling #22455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat(browser): Update docs for setUserId() + session handling #22455
Conversation
|
Hi @ptang-nr 👋 Thanks for your pull request! Your PR is in a queue, and a writer will take a look soon. We generally publish small edits within one business day, and larger edits within three days. Please ensure the propsed changes look good by building it first in your local environment. Refer to this contribution guide to get the site up and running in your local. If you really require a preview url, reach out to one of the writers and they will generate one for you. |
src/content/docs/browser/new-relic-browser/browser-apis/setuserid.mdx
Outdated
Show resolved
Hide resolved
| ```js | ||
| newrelic.setUserId('user-1234-v1.0') | ||
| newrelic.setUserId('user-1234-v1.0', true) | ||
| ``` | ||
|
|
||
| ### Stopping events from attributing to current user | ||
|
|
||
| ```js | ||
| newrelic.setUserId(null) | ||
| newrelic.setUserId(null, true) | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need examples of using with and without the reset flag, maybe with better commentary explaining the differences
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to hopefully better illustrate the usage diffs. I found it easier if I framed it around having a single user vs. multiple users.
…rid.mdx Co-authored-by: Jordan Porter <silentsummitsoftware@gmail.com>
Give us some context
This PR updates browser docs dealing with
setUserId()and session handling. A new optional argument is being introduced tosetUserId()that allows customers to reset the browser agent session while updating the user identifier.https://new-relic.atlassian.net/browse/NR-482567
newrelic/newrelic-browser-agent#1646