feat: reassign custom dimensions (#44252)
* feat: reassign custom dimentions * Apply suggestions from code review Co-authored-by: Shaun Hamilton <shauhami020@gmail.com> Co-authored-by: Shaun Hamilton <shauhami020@gmail.com>
This commit is contained in:
@ -24,13 +24,18 @@ function* callGaType({ payload: { type, data } }) {
|
|||||||
const completedChallengeTotal = yield select(completedChallengesSelector);
|
const completedChallengeTotal = yield select(completedChallengesSelector);
|
||||||
const completedChallengeSession = yield select(completionCountSelector);
|
const completedChallengeSession = yield select(completionCountSelector);
|
||||||
const customDimensions = {
|
const customDimensions = {
|
||||||
Test_Variation: emailToABVariant(email).isAVariant ? 'A' : 'B',
|
// URL;
|
||||||
Test_Type: aBTestConfig.type,
|
dimension1: window.location.href,
|
||||||
Challenges_Completed_Session: completedChallengeSession,
|
// Challenges_Completed_Session
|
||||||
Challenges_Completed_Total: completedChallengeTotal.length,
|
dimension2: completedChallengeSession,
|
||||||
URL: window.location.href
|
// Challenges_Completed_Total
|
||||||
|
dimension3: completedChallengeTotal.length,
|
||||||
|
// Test_Type
|
||||||
|
dimension4: aBTestConfig.type,
|
||||||
|
// Test_Variation
|
||||||
|
dimension5: emailToABVariant(email).isAVariant ? 'A' : 'B'
|
||||||
};
|
};
|
||||||
data = { ...data, ...customDimensions };
|
ga.set(customDimensions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user