Skip to content
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

Fix: Change from sessionStorage to localStorage #19322

Merged
merged 2 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
freshnessValidatedDate: never
---

Browser monitoring's [page load timing](/docs/browser/new-relic-browser/page-load-timing-resources/page-load-timing-process) feature can track sessions by using the sessionStorage API that can store a simple session identifier.
Browser monitoring's [page load timing](/docs/browser/new-relic-browser/page-load-timing-resources/page-load-timing-process) feature can track sessions by using the localStorage API that can store a simple session identifier.

## How it works [#process]

Expand All @@ -30,12 +30,10 @@
* Clicking
* Scrolling
* Typing

Session tracking will not work properly in these situations:

* If users have DOM Storage disabled in their browser.
* If the browser or page is configured to **not** allow loading and execution of third-party origin scripts through security policies or other means (which naturally means the agent as a whole will not function).
* Browser storage APIs such as LocalStorage are cleared during an active session
* Session tracking will not work properly in these situations:

Check failure on line 33 in src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'won't' instead of 'will not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'won't' instead of 'will not'.", "location": {"path": "src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx", "range": {"start": {"line": 33, "column": 20}}}, "severity": "ERROR"}

Check warning on line 33 in src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [new-relic.Adverbs] Consider removing 'properly'. Raw Output: {"message": "[new-relic.Adverbs] Consider removing 'properly'.", "location": {"path": "src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx", "range": {"start": {"line": 33, "column": 34}}}, "severity": "INFO"}
* If users have DOM Storage disabled in their browser.
* If the browser or page is configured to **not** allow loading and execution of third-party origin scripts through security policies or other means (which naturally means the agent as a whole will not function).

Check warning on line 35 in src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'is configured' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'is configured' looks like passive voice.", "location": {"path": "src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx", "range": {"start": {"line": 35, "column": 28}}}, "severity": "INFO"}

Check warning on line 35 in src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [new-relic.Adverbs] Consider removing 'naturally'. Raw Output: {"message": "[new-relic.Adverbs] Consider removing 'naturally'.", "location": {"path": "src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx", "range": {"start": {"line": 35, "column": 159}}}, "severity": "INFO"}

Check failure on line 35 in src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Contractions] Use 'won't' instead of 'will not'. Raw Output: {"message": "[Microsoft.Contractions] Use 'won't' instead of 'will not'.", "location": {"path": "src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx", "range": {"start": {"line": 35, "column": 196}}}, "severity": "ERROR"}
* Browser storage APIs such as localStorage are cleared during an active session.

Check warning on line 36 in src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx

View workflow job for this annotation

GitHub Actions / vale-linter

[vale] reported by reviewdog 🐶 [Microsoft.Passive] 'are cleared' looks like passive voice. Raw Output: {"message": "[Microsoft.Passive] 'are cleared' looks like passive voice.", "location": {"path": "src/content/docs/browser/browser-monitoring/page-load-timing-resources/cookie-collection-session-tracking.mdx", "range": {"start": {"line": 36, "column": 47}}}, "severity": "INFO"}

## Enable or disable tracking [#settings]

Expand Down
Loading