Skip to content

Commit

Permalink
v4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
blazzy committed Apr 20, 2018
1 parent 5339b6d commit d27119d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unreleased
### 4.2.1 (April 19, 2018)

* Add `resetSessionId` method that sets the sessionId to the current time.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please see our [installation guide](https://amplitude.zendesk.com/hc/en-us/artic
[![npm version](https://badge.fury.io/js/amplitude-js.svg)](https://badge.fury.io/js/amplitude-js)
[![Bower version](https://badge.fury.io/bo/amplitude-js.svg)](https://badge.fury.io/bo/amplitude-js)

[4.1.1 - Released on March 22, 2018](https://github.com/amplitude/Amplitude-JavaScript/releases/latest)
[4.2.1 - Released on April 18, 2018](https://github.com/amplitude/Amplitude-JavaScript/releases/latest)


# JavaScript SDK Reference #
Expand Down
2 changes: 1 addition & 1 deletion amplitude-segment-snippet.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var i=function(){this._q=[];return this}
;return this}
;var u=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
;for(var c=0;c<u.length;c++){r(a,u[c])}n.Revenue=a
;var l=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","logEventWithTimestamp","logEventWithGroups","setSessionId"]
;var l=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
;function p(e){function t(t){e[t]=function(){
e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}
for(var n=0;n<l.length;n++){t(l[n])}}p(n);n.getInstance=function(e){
Expand Down
4 changes: 2 additions & 2 deletions amplitude-snippet.min.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function(e,t){var n=e.amplitude||{_q:[],_iq:{}};var r=t.createElement("script")
;r.type="text/javascript";r.async=true
;r.src="https://cdn.amplitude.com/libs/amplitude-4.1.1-min.gz.js"
;r.src="https://cdn.amplitude.com/libs/amplitude-4.2.1-min.gz.js"
;r.onload=function(){if(e.amplitude.runQueuedFunctions){
e.amplitude.runQueuedFunctions()}else{
console.log("[Amplitude] Error: could not load SDK")}}
Expand All @@ -13,7 +13,7 @@ var o=function(){this._q=[];return this}
;return this}
;var l=["setProductId","setQuantity","setPrice","setRevenueType","setEventProperties"]
;for(var p=0;p<l.length;p++){s(c,l[p])}n.Revenue=c
;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","logEventWithTimestamp","logEventWithGroups","setSessionId"]
;var d=["init","logEvent","logRevenue","setUserId","setUserProperties","setOptOut","setVersionName","setDomain","setDeviceId","setGlobalUserProperties","identify","clearUserProperties","setGroup","logRevenueV2","regenerateDeviceId","logEventWithTimestamp","logEventWithGroups","setSessionId","resetSessionId"]
;function v(e){function t(t){e[t]=function(){
e._q.push([t].concat(Array.prototype.slice.call(arguments,0)))}}
for(var n=0;n<d.length;n++){t(d[n])}}v(n);n.getInstance=function(e){
Expand Down
6 changes: 5 additions & 1 deletion amplitude.js
Original file line number Diff line number Diff line change
Expand Up @@ -5627,7 +5627,7 @@ var uuid$1 = function uuid(a) {
);
};

var version = '4.1.1';
var version = '4.2.1';

var getLanguage = function getLanguage() {
return navigator && (navigator.languages && navigator.languages[0] || navigator.language || navigator.userLanguage) || undefined;
Expand Down Expand Up @@ -6349,6 +6349,10 @@ AmplitudeClient.prototype.setSessionId = function setSessionId(sessionId) {
}
};

AmplitudeClient.prototype.resetSessionId = function resetSessionId() {
this.setSessionId(new Date().getTime());
};

/**
* Regenerates a new random deviceId for current user. Note: this is not recommended unless you know what you
* are doing. This can be used in conjunction with `setUserId(null)` to anonymize users after they log out.
Expand Down
2 changes: 1 addition & 1 deletion amplitude.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "amplitude-js",
"author": "Amplitude <[email protected]>",
"version": "4.1.1",
"version": "4.2.1",
"license": "MIT",
"description": "Javascript library for Amplitude Analytics",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/amplitude-snippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var as = document.createElement('script');
as.type = 'text/javascript';
as.async = true;
as.src = 'https://cdn.amplitude.com/libs/amplitude-4.1.1-min.gz.js';
as.src = 'https://cdn.amplitude.com/libs/amplitude-4.2.1-min.gz.js';
as.onload = function() {if(window.amplitude.runQueuedFunctions) {window.amplitude.runQueuedFunctions();} else {console.log('[Amplitude] Error: could not load SDK');}};
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(as, s);
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default '4.1.1';
export default '4.2.1';

0 comments on commit d27119d

Please sign in to comment.