Skip to content

Commit e3b10e8

Browse files
committed
callout downsides to disabling client persistence
1 parent b351c60 commit e3b10e8

File tree

1 file changed

+12
-0
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+12
-0
lines changed

src/connections/sources/catalog/libraries/website/javascript/persistence.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,15 @@ You can completely disable client-side persistence when loading Analytics.js by
109109
```js
110110
analytics.load('writeKey', { disableClientPersistence: true })
111111
```
112+
113+
### Identity
114+
115+
When `disableClientPersistence` is set to `true`, Analytics.js will not be able to automatically keep track of a user's identity when navigating to different pages. This can cause increased MTU usage if the anonymous usage cannot be associated with a `userId`.
116+
117+
You can still manually track identity by calling `analytics.identify()` with the known identity on each page load, or pass in identity information to each page using the [querystring API](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/querystring/).
118+
119+
### Event Retries
120+
121+
Analytics.js tries to detect when a page is about to be closed and saves pending events to `localStorage`. When the user navigates to another page within the same domain, analytics.js will attempt to send any events it finds in localStorage.
122+
123+
When `disableClientPersistence` is set to `true`, Analytics.js will not store any pending events into `localStorage`.

0 commit comments

Comments
 (0)