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: modules/Constants.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ var healthCheckCounterEnum = Object.freeze({
104
104
errorMessage: "cly_hc_error_message",
105
105
});
106
106
107
-
varSDK_VERSION="24.4.0";
107
+
varSDK_VERSION="24.4.1";
108
108
varSDK_NAME="javascript_native_web";
109
109
110
110
// Using this on document.referrer would return an array with 17 elements in it. The 12th element (array[11]) would be the path we are looking for. Others would be things like password and such (use https://regex101.com/ to check more)
Copy file name to clipboardExpand all lines: modules/CountlyClass.js
+58-40Lines changed: 58 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -984,17 +984,33 @@ class CountlyClass {
984
984
};
985
985
986
986
/**
987
-
* Change current user/device id
987
+
* Changes the current device ID according to the device ID type (the preffered method)
988
+
* @param {string} newId - new user/device ID to use. Must be a non-empty string value. Invalid values (like null, empty string or undefined) will be rejected
989
+
* */
990
+
this.set_id=function(newId){
991
+
log(logLevelEnums.INFO,"set_id, Changing the device ID to:["+newId+"]");
992
+
if(newId==null||newId===""){
993
+
log(logLevelEnums.WARNING,"set_id, The provided device is not a valid ID");
/*change ID without merge as current ID is Dev supplied, so not first login*/
998
+
this.change_id(newId,false);
999
+
}else{
1000
+
/*change ID with merge as current ID is not Dev supplied*/
1001
+
this.change_id(newId,true);
1002
+
}
1003
+
}
1004
+
1005
+
/**
1006
+
* Change current user/device id (use set_id instead if you are not sure about the merge operation)
988
1007
* @param {string} newId - new user/device ID to use. Must be a non-empty string value. Invalid values (like null, empty string or undefined) will be rejected
989
1008
* @param {boolean} merge - move data from old ID to new ID on server
990
1009
* */
991
1010
this.change_id=function(newId,merge){
992
-
log(logLevelEnums.INFO,"change_id, Changing the ID");
993
-
if(merge){
994
-
log(logLevelEnums.INFO,"change_id, Will merge the IDs");
995
-
}
1011
+
log(logLevelEnums.INFO,"change_id, Changing the device ID to: ["+newId+"] with merge:["+merge+"]");
0 commit comments