@@ -39,7 +39,7 @@ export class Experiment {
3939 const currentActiveExperiments =
4040 ( await this . storage . getActiveExperiments ( ) ) || new Set < string > ( ) ;
4141 const experimentInfoMap = this . createExperimentInfoMap ( latestExperiments ) ;
42- this . addActiveExperiments ( currentActiveExperiments , experimentInfoMap ) ;
42+ this . addActiveExperiments ( experimentInfoMap ) ;
4343 this . removeInactiveExperiments ( currentActiveExperiments , experimentInfoMap ) ;
4444 return this . storage . setActiveExperiments ( new Set ( experimentInfoMap . keys ( ) ) ) ;
4545 }
@@ -55,14 +55,11 @@ export class Experiment {
5555 }
5656
5757 private addActiveExperiments (
58- currentActiveExperiments : Set < string > ,
5958 experimentInfoMap : Map < string , FirebaseExperimentDescription >
6059 ) : void {
6160 const customProperty : Record < string , string | null > = { } ;
6261 for ( const [ experimentId , experimentInfo ] of experimentInfoMap . entries ( ) ) {
63- if ( ! currentActiveExperiments . has ( experimentId ) ) {
64- customProperty [ experimentId ] = experimentInfo . variantId ;
65- }
62+ customProperty [ experimentId ] = experimentInfo . variantId ;
6663 }
6764 this . addExperimentToAnalytics ( customProperty ) ;
6865 }
@@ -90,6 +87,7 @@ export class Experiment {
9087 const analytics = this . analyticsProvider . getImmediate ( { optional : true } ) ;
9188 if ( analytics ) {
9289 analytics . setUserProperties ( { properties : customProperty } ) ;
90+ analytics . logEvent ( `Received ABT experiment update` ) ;
9391 } else {
9492 this . logger . warn ( `Analytics import failed` ) ;
9593 }
0 commit comments