@kameleoon/javascript-sdk-core
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -162,2 +162,9 @@ import { JSONType } from './campaignConfiguration'; | ||
/** | ||
* @method getEngineTrackingCode - returns Kameleoon tracking code for the current visitor. Tracking code is built of the experiments that were triggered and feature flag variations that were assigned during the last 5 seconds | ||
* See [Kameleoon Automation API](https://developers.kameleoon.com/apis/activation-api-js/api-reference#trigger-1) for the details | ||
* @param {string} visitorCode - unique visitor identification string, can't exceed 255 characters length | ||
* @returns {string} Kameleoon tracking code | ||
*/ | ||
getEngineTrackingCode: (visitorCode: string) => string; | ||
/** | ||
* @method onConfigurationUpdate - fires a callback on client configuration update. Note: this method only works for server sent events of real time update. | ||
@@ -203,4 +210,4 @@ * @param {() => void} callback - callback function with no parameters that will be called upon configuration update | ||
onConfigurationUpdate(callback: () => void): void; | ||
protected _getEngineTrackingCode(visitorCode: string): string; | ||
getEngineTrackingCode(visitorCode: string): string; | ||
private _getFeatureFlagVariation; | ||
} |
@@ -136,10 +136,8 @@ "use strict"; | ||
}, trackingParameters)); | ||
if (this.internalConfiguration.externalPackageInfo.type === _constants.SDKType.NodeJS) { | ||
_utilities.Utilities.updateCache({ | ||
cacheManager: this.trackingCache, | ||
visitorCode, | ||
experimentId, | ||
variationId | ||
}); | ||
} | ||
_utilities.Utilities.updateCache({ | ||
cacheManager: this.trackingCache, | ||
visitorCode, | ||
experimentId, | ||
variationId | ||
}); | ||
return variationId; | ||
@@ -336,3 +334,3 @@ } | ||
} | ||
_getEngineTrackingCode(visitorCode) { | ||
getEngineTrackingCode(visitorCode) { | ||
return _utilities.Utilities.getTrackingCode(this.trackingCache, visitorCode); | ||
@@ -361,3 +359,3 @@ } | ||
} = variationData; | ||
if (this.internalConfiguration.externalPackageInfo.type === _constants.SDKType.NodeJS && typeof variationId === 'number' && typeof experimentId === 'number') { | ||
if (typeof variationId === 'number' && typeof experimentId === 'number') { | ||
_utilities.Utilities.updateCache({ | ||
@@ -364,0 +362,0 @@ cacheManager: this.trackingCache, |
{ | ||
"name": "@kameleoon/javascript-sdk-core", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"description": "Kameleoon JS SDK Core", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
474510
5414