Skip to content

Commit 8f0cf8c

Browse files
feat: lbc redirect test added (#6138)
1 parent 267dab7 commit 8f0cf8c

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/pages/LoanFinding/LoanFinding.vue

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ const FLSS_ONGOING_EXP_KEY = 'EXP-FLSS-Ongoing-Sitewide-3';
164164
const LOAN_RECOMMENDATIONS_EXP_KEY = 'lh_loan_recommendations';
165165
const QUICK_FILTERS_MOBILE_EXP_KEY = 'lh_qf_mobile_version';
166166
const THREE_LOANS_RECOMMENDED_ROW_EXP_KEY = 'lh_three_loans_recommended_row';
167+
const COMBO_PAGE_REDIRECT_EXP_KEY = 'lbc_combo_redirect';
167168
168169
export default {
169170
name: 'LoanFinding',
@@ -219,10 +220,20 @@ export default {
219220
query: experimentAssignmentQuery,
220221
variables: { id: LOAN_RECOMMENDATIONS_EXP_KEY }
221222
}),
222-
client.query({ query: userInfoQuery })
223-
]).then(([recommendationsExp, userInfo]) => {
223+
client.query({ query: userInfoQuery }),
224+
client.query({
225+
query: experimentAssignmentQuery,
226+
variables: { id: COMBO_PAGE_REDIRECT_EXP_KEY }
227+
}),
228+
]).then(([recommendationsExp, userInfo, redirectExp]) => {
224229
const useRecommendations = recommendationsExp?.data?.experiment?.version === 'b';
225230
const userId = userInfo?.data?.my?.userAccount?.id || null;
231+
const isRedirectExp = redirectExp?.data?.experiment?.version === 'b';
232+
233+
// Redirect to /lend-category-beta if redirect experiment is active
234+
if (isRedirectExp) {
235+
return Promise.reject({ path: '/lend-category-beta' });
236+
}
226237
227238
return Promise.all([
228239
client.query({
@@ -606,6 +617,15 @@ export default {
606617
this.showSideSheet = true;
607618
}
608619
}
620+
621+
// Track experiment version for combo page redirect
622+
trackExperimentVersion(
623+
this.apollo,
624+
this.$kvTrackEvent,
625+
'Lending',
626+
COMBO_PAGE_REDIRECT_EXP_KEY,
627+
'EXP-MP-1758-Jul2025',
628+
);
609629
},
610630
beforeUnmount() {
611631
this.destroySpotlightViewportObserver();

0 commit comments

Comments
 (0)