Skip to content

Commit 88d0a1c

Browse files
author
Athira M
committed
Add firebase prefix to exp
1 parent 78977a6 commit 88d0a1c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

packages/remote-config/src/abt/experiment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class Experiment {
5959
): void {
6060
const customProperty: Record<string, string | null> = {};
6161
for (const [experimentId, experimentInfo] of experimentInfoMap.entries()) {
62-
customProperty[experimentId] = experimentInfo.variantId;
62+
customProperty[`firebase${experimentId}`] = experimentInfo.variantId;
6363
}
6464
this.addExperimentToAnalytics(customProperty);
6565
}
@@ -71,7 +71,7 @@ export class Experiment {
7171
const customProperty: Record<string, string | null> = {};
7272
for (const experimentId of currentActiveExperiments) {
7373
if (!experimentInfoMap.has(experimentId)) {
74-
customProperty[experimentId] = null;
74+
customProperty[`firebase${experimentId}`] = null;
7575
}
7676
}
7777
this.addExperimentToAnalytics(customProperty);

packages/remote-config/test/abt/experiment.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ describe('Experiment', () => {
8282
expectedStoredExperiments
8383
);
8484
expect(analytics.setUserProperties).to.have.been.calledWith({
85-
'_exp_3': '1',
86-
'_exp_1': '2',
87-
'_exp_2': '1'
85+
'firebase_exp_3': '1',
86+
'firebase_exp_1': '2',
87+
'firebase_exp_2': '1'
8888
});
8989
});
9090

@@ -110,7 +110,7 @@ describe('Experiment', () => {
110110
expectedStoredExperiments
111111
);
112112
expect(analytics.setUserProperties).to.have.been.calledWith({
113-
'_exp_2': null
113+
'firebase_exp_2': null
114114
});
115115
});
116116
});

0 commit comments

Comments
 (0)