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 completedChallengeSession = yield select(completionCountSelector);
|
||||
const customDimensions = {
|
||||
Test_Variation: emailToABVariant(email).isAVariant ? 'A' : 'B',
|
||||
Test_Type: aBTestConfig.type,
|
||||
Challenges_Completed_Session: completedChallengeSession,
|
||||
Challenges_Completed_Total: completedChallengeTotal.length,
|
||||
URL: window.location.href
|
||||
// URL;
|
||||
dimension1: window.location.href,
|
||||
// Challenges_Completed_Session
|
||||
dimension2: completedChallengeSession,
|
||||
// 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