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: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,10 +104,10 @@ amplitude.getInstance().logEvent('Viewed Home Page');
104
104
105
105
### Synchronizing Device Ids Between Apps ###
106
106
107
-
As mentioned before, each instance will have its own deviceId. If you want your apps to share the same deviceId, you can do so *after init*via the `getDeviceId` and `setDeviceId` methods. Here's an example of how to copy the existing deviceId to the `new_app` instance:
107
+
As mentioned before, each instance will have its own deviceId. If you want your apps to share the same deviceId, you can do so *after init*by fetching the deviceId and using `setDeviceId`. Here's an example of how to copy the existing deviceId to the `new_app` instance:
108
108
109
109
```javascript
110
-
var deviceId =amplitude.getInstance().getDeviceId(); // existing deviceId
110
+
var deviceId =amplitude.getInstance().options.deviceId; // existing deviceId
111
111
amplitude.getInstance('new_app').setDeviceId(deviceId); // transferring existing deviceId to new_app
| eventUploadPeriodMillis | number | Amount of time in milliseconds that the SDK waits before uploading events if`batchEvents` is `true`. |30\*1000 (30 sec) |
329
329
| eventUploadThreshold | number | Minimum number of events to batch together per request if`batchEvents` is `true`. |30|
330
330
| includeReferrer | boolean | If `true`, captures the `referrer` and `referring_domain`for each session, as well as the user's `initial_referrer` and `initial_referring_domain` via a set once operation. | `false` |
331
-
| includeUtm | boolean | If `true`, finds utm parameters in the query string or the __utmz cookie, parses, and includes them as user propeties on all events uploaded. | `false` |
331
+
| includeUtm | boolean | If `true`, finds utm parameters in the query string or the __utmz cookie, parses, and includes them as user propeties on all events uploaded. Also captures initial utm parameters for each session via a set once operation. | `false` |
332
332
| language | string | Custom language to set | Language determined by browser |
333
333
| optOut | boolean | Whether to disable tracking for the current user | `false` |
334
334
| platform | string | Custom platform to set | 'Web' |
0 commit comments