You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/website/javascript/persistence.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,9 @@ This page explains what data Analytics.js stores on the client and how to overri
9
9
10
10
<!-- Note: 1st 2 paragraphs copied from identity.md -->
11
11
12
-
To ensure high fidelity, first-party customer data, Segment writes the user's IDs to the user's localStorage, and uses that as the Segment ID on the cookie whenever possible. LocalStorage is meant for storing this type of first-party customer information.
12
+
To ensure high fidelity, first-party customer data, Segment writes the user's IDs to the user's local storage, and uses that as the Segment ID on the cookie whenever possible. Local Storage is meant for storing this type of first-party customer information.
13
13
14
-
If a user returns to your site after the cookie expires, Analytics.js looks for an old ID in the user's `localStorage`, and if one is found, sets it as the user's ID again in the new cookie. If a user clears their cookies _and_`localstorage`, all of the IDs are removed, and the user gets a completely new [anonymousID](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/identity/#anonymous-ids) when they next visit the page.
14
+
If a user returns to your site after the cookie expires, Analytics.js looks for an old ID in the user's `localStorage`, and if one is found, sets it as the user's ID again in the new cookie. If a user clears their cookies _and_`localStorage`, all of the IDs are removed, and the user gets a completely new [`anonymousID`](/docs/connections/sources/catalog/libraries/website/javascript/identity/#anonymous-ids) when they next visit the page.
15
15
16
16
### Cookie Settings
17
17
@@ -51,7 +51,7 @@ The user object has the following fields and default values:
51
51
|`persist`| This toggles storing user information locally. |`true`|
52
52
|`cookie.key`| Name of the cookie used to store the user ID. |`ajs_user_id`|
53
53
|`cookie.oldKey`| Name of a cookie previously used to store the user ID. Will be read if `cookie.key` can't be found. |`ajs_user`|
54
-
|`localStorage.key`| Name of the key used to store user traits in LocalStorage. |`ajs_user_traits`|
54
+
|`localStorage.key`| Name of the key used to store user traits in localStorage. |`ajs_user_traits`|
55
55
56
56
Example:
57
57
```js
@@ -70,15 +70,15 @@ analytics.load('writeKey', {
70
70
71
71
### Group Settings
72
72
73
-
Analytics.js automatically persists the user's group ID and group properties locally. You can override how and where the group ID and properties are stored when loading analytics.js by passing in a `group` object to the load method.
73
+
Analytics.js automatically persists the user's group ID and group properties locally. You can override how and where the group ID and properties are stored when loading Analytics.js by passing in a `group` object to the load method.
74
74
75
75
The group object has the following fields and default values:
76
76
77
77
| Field | Description | Default value |
78
78
| ----- | ----------- | ------------- |
79
79
|`persist`| Toggles storing group information locally. |`true`|
80
80
|`cookie.key`| Name of the cookie used to store the group id. |`ajs_group_id`|
81
-
|`localStorage.key`| Name of the key used to store user traits in LocalStorage. |`ajs_group_properties`|
81
+
|`localStorage.key`| Name of the key used to store user traits in localStorage. |`ajs_group_properties`|
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`.
115
+
When `disableClientPersistence` is set to `true`, Analytics.js won't 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 can't be associated with a `userId`.
116
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/).
117
+
You can still manually track identity by calling `analytics.identify()` with the known identity on each page load, or you can pass in identity information to each page using the [querystring API](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/querystring/).
118
118
119
119
### Event Retries
120
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.
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 attempts to send any events it finds in localStorage.
122
122
123
-
When `disableClientPersistence` is set to `true`, Analytics.js will not store any pending events into `localStorage`.
123
+
When `disableClientPersistence` is set to `true`, Analytics.js won't store any pending events into `localStorage`.
0 commit comments