Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(analytics): ilya/DERG-2409/Add_tracking_to_real_account_sign_up_on_Deriv_Go #603

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DerivRudderstackEvents {
properties: <String, dynamic>{
'action': 'open',
'form_source': 'mobile_derivgo',
'form_name': 'virtual_signup_derivgo'
'form_name': 'common_events_derivgo'
},
);
}
Expand Down Expand Up @@ -56,7 +56,7 @@ class DerivRudderstackEvents {
DerivRudderstack().track(
eventName: 'ce_virtual_signup_form',
properties: <String, dynamic>{
'action': 'tab_referral_toggle',
'action': 'tap_referral_toggle',
'form_source': 'mobile_derivgo',
'form_name': 'virtual_signup_derivgo'
},
Expand Down Expand Up @@ -182,4 +182,98 @@ class DerivRudderstackEvents {
},
);
}

/// Tracks when the real signup form opened.
void logOpenRealSignUp() {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: <String, dynamic>{
'action': 'open_real_sign_up',
'form_source': 'mobile_derivgo',
'form_name': 'real_signup_derivgo'
},
);
}

/// Tracks when the user presses the next button
/// and the step is successfully passed.
void logStepPassedRealSignUp(
[String? stepNum,
String? stepCodename,
Map<String, dynamic>? userChoice]) {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: {
'action': 'step_passed',
'step_codename': stepCodename,
'step_num': stepNum,
'user_choice': userChoice,
'form_source': 'mobile_derivgo',
'form_name': 'real_signup_derivgo'
},
);
}

/// Tracks when user tap the 'previous' button and go to previous screen.
void logStepBackRealSignUp(String stepCodeName) {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: <String, dynamic>{
'action': 'step_back',
'form_source': 'mobile_derivgo',
'form_name': 'real_signup_derivgo'
},
);
}

/// Tracks if the user presses the close button on the signup form.
void logCloseRealSignUp() {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: <String, dynamic>{
'action': 'close',
'form_source': 'mobile_derivgo',
'form_name': 'real_signup_derivgo'
},
);
}

/// Tracks if any logical error has happened on the form,
/// validation error for instance.
void logValidationErrorDuringRealSignUp() {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: <String, dynamic>{
'action': 'real_signup_error',
'form_source': 'mobile_derivgo',
'form_name': 'real_signup_derivgo'
},
);
}

/// Tracks system error has happened,
/// like no connection to the server and etc.
void logError(String error) {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: <String, dynamic>{
'action': 'other_error',
'error_message': error,
'form_source': 'mobile_derivgo',
'form_name': 'common_events_derivgo'
},
);
}

/// Tracks when the signup flow is finished.
void logRealSignUpFinished() {
DerivRudderstack().track(
eventName: 'ce_real_account_signup_form',
properties: <String, dynamic>{
'action': 'real_signup_finished',
'form_source': 'mobile_derivgo',
'form_name': 'real_signup_derivgo'
},
);
}
}
Loading