Skip to content

Commit

Permalink
fix: only log experiment assignment if the user is not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
dyersituations committed Jun 18, 2024
1 parent fe23ae0 commit 159c2d5
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/pages/Checkout/CheckoutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1148,20 +1148,22 @@ export default {
this.depositIncentiveExperimentEnabled = depositIncentiveExp.version === 'b';
},
initializeCheckoutStickyExperiment() {
const checkoutStickyExperiment = this.apollo.readFragment({
id: `Experiment:${CHECKOUT_STICKY_EXP_KEY}`,
fragment: experimentVersionFragment,
}) || {};
if (!this.isLoggedIn) {
const checkoutStickyExperiment = this.apollo.readFragment({
id: `Experiment:${CHECKOUT_STICKY_EXP_KEY}`,
fragment: experimentVersionFragment,
}) || {};
if (checkoutStickyExperiment.version) {
this.$kvTrackEvent(
'basket',
'EXP-MP-360-Jun2024',
checkoutStickyExperiment.version,
);
}
if (checkoutStickyExperiment.version) {
this.$kvTrackEvent(
'basket',
'EXP-MP-360-Jun2024',
checkoutStickyExperiment.version,
);
}
this.checkoutStickyExperimentEnabled = checkoutStickyExperiment.version === 'b';
this.checkoutStickyExperimentEnabled = checkoutStickyExperiment.version === 'b';
}
},
},
destroyed() {
Expand Down

0 comments on commit 159c2d5

Please sign in to comment.