@amplitude/experiment-js-client
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.3.3](https://github.com/amplitude/experiment-js-client/compare/v1.3.2...v1.3.3) (2022-01-20) | ||
### Bug Fixes | ||
* fix unset user property ([#20](https://github.com/amplitude/experiment-js-client/issues/20)) ([b722506](https://github.com/amplitude/experiment-js-client/commit/b722506c79bd920467025f46beda28416bb63a71)) | ||
## [1.3.2](https://github.com/amplitude/experiment-js-client/compare/v1.3.1...v1.3.2) (2022-01-20) | ||
@@ -8,0 +19,0 @@ |
@@ -7,4 +7,2 @@ (function (global, factory) { | ||
var safeGlobal = typeof globalThis !== 'undefined' ? globalThis : global || self; | ||
/** | ||
@@ -66,4 +64,7 @@ * An AmplitudeUserProvider injects information from the Amplitude SDK into | ||
AmplitudeAnalyticsProvider.prototype.unsetUserProperty = function (event) { | ||
var _a; | ||
// if the variant does not have a value, unset the user property | ||
this.amplitudeInstance.identify(new safeGlobal.amplitude.Identify().unset(event.userProperty)); | ||
this.amplitudeInstance._logEvent('$identify', null, null, { | ||
$unset: (_a = {}, _a[event.userProperty] = '-', _a), | ||
}); | ||
}; | ||
@@ -247,3 +248,3 @@ return AmplitudeAnalyticsProvider; | ||
var version = "1.3.2"; | ||
var version = "1.3.3"; | ||
@@ -436,2 +437,4 @@ /** | ||
var safeGlobal = typeof globalThis !== 'undefined' ? globalThis : global || self; | ||
/** | ||
@@ -438,0 +441,0 @@ * @packageDocumentation |
import { ExperimentAnalyticsEvent } from '../types/analytics'; | ||
import { ExperimentUserProvider, ExperimentAnalyticsProvider } from '../types/provider'; | ||
import { ExperimentUser } from '../types/user'; | ||
declare global { | ||
var amplitude: any; | ||
} | ||
declare type AmplitudeIdentify = { | ||
@@ -15,2 +12,3 @@ set(property: string, value: unknown): void; | ||
logEvent(eventName: string, properties: Record<string, string>): void; | ||
_logEvent(eventType: string, eventProperties: Record<string, unknown>, apiProperties: Record<string, unknown>, userProperties: Record<string, unknown>): any; | ||
setUserProperties(userProperties: Record<string, unknown>): void; | ||
@@ -17,0 +15,0 @@ identify(identify: AmplitudeIdentify): void; |
{ | ||
"name": "@amplitude/experiment-js-client", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Javascript Client SDK for Amplitude Experiment", | ||
@@ -34,3 +34,3 @@ "main": "dist/experiment.umd.js", | ||
}, | ||
"gitHead": "9923bbaf0f156931a353afe2751385a69ff077eb" | ||
"gitHead": "c442f6343e0f4f3d700f6ea86d8262d62b27102a" | ||
} |
72553
1683