Skip to content

Commit 819b0a8

Browse files
author
Daniel Jih
committed
cleanup
1 parent fd10163 commit 819b0a8

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Unreleased
22

33
* Add `logEventWithTimestamp` to allow logging events with a custom timestamp. The timestamp should a number representing the time in milliseconds since epoch. See [documentation](https://rawgit.com/amplitude/Amplitude-Javascript/master/documentation/AmplitudeClient.html) for more details.
4-
* Add configuration option `deviceIdFromUrlParam`, which when set to `true` will have the SDK parse device Ids from url parameter `amp_device_id` if available. DeviceIds defined in the configuration options during init will take priority over device Ids from url parameters.
4+
* Add configuration option `deviceIdFromUrlParam`, which when set to `true` will have the SDK parse device IDs from url parameter `amp_device_id` if available. Device IDs defined in the configuration options during init will take priority over device IDs from url parameters.
55

66
### 3.3.2 (October 28, 2016)
77

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ amplitude.getInstance().init('YOUR_API_KEY_HERE', null, {
328328
| cookieExpiration | number | The number of days after which the Amplitude cookie will expire | 365\*10 (10 years) |
329329
| cookieName | string | Custom name for the Amplitude cookie | 'amplitude_id' |
330330
| deviceId | string | Custom device ID to set. Note this is not recommended unless you really know what you are doing (like if you have your own system for tracking user devices) | Randomly generated UUID |
331-
| deviceIdFromUrlParam | boolean | If `true`, the SDK will parse device Id values from url parameter `amp_device_id` if available. Device Ids defined in the configuration options during init will take priority over device Ids from url parameters.
331+
| deviceIdFromUrlParam | boolean | If `true`, the SDK will parse device ID values from url parameter `amp_device_id` if available. Device IDs defined in the configuration options during init will take priority over device IDs from url parameters.
332332
| domain | string | Custom cookie domain | The top domain of the current page's url |
333333
| eventUploadPeriodMillis | number | Amount of time in milliseconds that the SDK waits before uploading events if `batchEvents` is `true`. | 30\*1000 (30 sec) |
334334
| eventUploadThreshold | number | Minimum number of events to batch together per request if `batchEvents` is `true`. | 30 |

test/browser/amplitudejs.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,26 @@
8787
}
8888
</script>
8989
<script>
90-
amplitude.init('a2dbce0e18dfe5f8e74493843ff5c053', null, {includeReferrer: true, includeUtm: true, includeGclid: true, deviceId: 'dcdf0a79-8676-5cc3-95fc-fa53517293ad'}, function() {
90+
amplitude.init('a2dbce0e18dfe5f8e74493843ff5c053', null, {includeReferrer: true, includeUtm: true, includeGclid: true}, function() {
9191
alert(amplitude.options.deviceId);
9292
});
93-
// amplitude.setVersionName('Web');
94-
// amplitude.identify(new amplitude.Identify().add('photoCount', 1));
95-
// amplitude.identify(new amplitude.Identify().add('photoCount', 1).set('gender', 'male').unset('karma'));
96-
// amplitude.logEvent('pageLoad');
93+
amplitude.setVersionName('Web');
94+
amplitude.identify(new amplitude.Identify().add('photoCount', 1));
95+
amplitude.identify(new amplitude.Identify().add('photoCount', 1).set('gender', 'male').unset('karma'));
96+
amplitude.logEvent('pageLoad');
9797

98-
// amplitude.getInstance('app2').logEvent('log event before init');
99-
// amplitude.getInstance('app2').init('1d2fe1e104eb3f07a24e94d359f70fd5', 'checkers@gmail.com', {includeReferrer: true}, function(instance) {
100-
// alert(instance.options.deviceId);
101-
// });
102-
// amplitude.getInstance('app2').identify(new amplitude.Identify().set('key', 'value'));
103-
// amplitude.getInstance('app2').logEvent('app 2 page load');
98+
amplitude.getInstance('app2').logEvent('log event before init');
99+
amplitude.getInstance('app2').init('1d2fe1e104eb3f07a24e94d359f70fd5', 'checkers@gmail.com', {includeReferrer: true}, function(instance) {
100+
alert(instance.options.deviceId);
101+
});
102+
amplitude.getInstance('app2').identify(new amplitude.Identify().set('key', 'value'));
103+
amplitude.getInstance('app2').logEvent('app 2 page load');
104104

105-
// amplitude.getInstance('app3').init('a2dbce0e18dfe5f8e74493843ff5c053', null, {batchEvents: true, eventUploadThreshold: 2});
106-
// amplitude.getInstance('app3').logEvent('app3 page Load');
105+
amplitude.getInstance('app3').init('a2dbce0e18dfe5f8e74493843ff5c053', null, {batchEvents: true, eventUploadThreshold: 2});
106+
amplitude.getInstance('app3').logEvent('app3 page Load');
107107

108-
// amplitude.getInstance('app4').init('1d2fe1e104eb3f07a24e94d359f70fd5', 'joe@gmail.com');
109-
// amplitude.getInstance('app4').logEvent('app 4 page load');
108+
amplitude.getInstance('app4').init('1d2fe1e104eb3f07a24e94d359f70fd5', 'joe@gmail.com');
109+
amplitude.getInstance('app4').logEvent('app 4 page load');
110110
</script>
111111
<body>
112112
<h3>Amplitude JS Test</h3>

0 commit comments

Comments
 (0)