-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Labels
P0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature
Description
Feature Description
GA events should be added to keep track of various interactions with the splash screen, and the Exit setup buttons on the splash, Analytics setup and Key Metrics setup screens.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The following GA events should be tracked for the given actions. See the GA events sheet.
- Where an event is detailed as replacing a legacy event, the legacy event should no longer be tracked.
- These changes are only active when the
setupFlowRefreshfeature flag is enabled.
| Event Name | Category | Label | Trigger | Condition | Details |
|---|---|---|---|---|---|
setup_flow_v3_tracking_optin |
splash |
click | user opts into tracking on splash screen | replaces legacy tracking_optin |
|
setup_flow_v3_skip_to_viewonly |
splash |
click | user clicks on button to skip setup and go directly to view-only dashboard | replaces legacy skip_setup_to_viewonly |
|
setup_flow_v3_start_site_setup |
{viewContext}_setup |
click | user clicks button on splash screen to start - ONLY initial setup, i.e. connecting the site | replaces legacy start_site_setup |
|
setup_flow_v3_start_user_setup |
{viewContext}_setup |
click | user clicks button on splash screen to start setup | replaces legacy start_user_setup |
|
setup_flow_v3_start_with_analytics |
{viewContext}_setup |
click | user starts setup with Analytics checkbox enabled on splash screen | replaces legacy start_setup_with_analytics |
|
setup_flow_v3_exit_setup |
one of splash or {viewContext}_setup |
current step: splash, analytics, or key-metrics |
click | user clicks the "Exit setup" button on the splash screen, Analytics setup screen, or Key Metrics setup screen | |
| _________________________________________ | _______________________ | ________________________ | ________ | _____________________________________________ | _______________________________ |
Implementation Brief
-
In
assets/js/components/OptIn.js- Accept an additional prop
gaTrackingEventArgswhich should be an object like existing existing notification components containingcategoryandaction. - Remove
trackEventCategoryprop as it won't be required and will be replaced bygaTrackingEventArgs.category, if the category is not available it should default toviewContextas it is currently.- If the
actionis not present, it should default totracking_optinas it is currently.
- If the
- Accept an additional prop
-
In
assets/js/components/setup/SetupUsingProxyWithSignIn/Actions.js- Pass
gaTrackingEventArgsprop wherecategorywould besplashandactionwould besetup_flow_v3_tracking_optin, ifsetupFlowRefreshis enabled. - In the
goToSharedDashboardmethod, calltrackEventto track thesetup_flow_v3_skip_to_viewonlyaction, according to the ACs, ifsetupFlowRefreshis enabled. This should replace the legacyskip_setup_to_viewonly(in the case where the feature is enabled).
- Pass
-
In
assets/js/components/setup/SetupUsingProxyWithSignIn/index.js- In the
onButtonClickmethod, calltrackEventto track thesetup_flow_v3_start_site_setupaction, according to the ACs, ifsetupFlowRefreshis enabled. This should replace the legacystart_site_setup(in the case where the feature is enabled).- Do the same for
setup_flow_v3_start_user_setup; it should replace the legacystart_user_setup(in the case where the feature is enabled). - If
connectAnalyticsistrueand thesetupFlowRefreshfeature is enabled, calltrackEventto track thesetup_flow_v3_start_with_analyticsaction, according to the ACs. It should replace the legacystart_setup_with_analytics.
- Do the same for
- In the
-
In
assets/js/components/setup/ExitSetup.js- Accept a new prop,
onClick, which should be a function. - If
onClickis present, call theonClickfunction in thehandleClickmethod.
- Accept a new prop,
-
Pass the
onClickprop to theExitSetupcomponent in the following components:assets/js/components/key-metrics-setup/KeyMetricsSetupApp.js- Call
trackEventwith:- label set to
key-metrics. - Category set to
{viewContext}_setup
- label set to
- Call
assets/js/components/setup/SetupUsingProxyWithSignIn/Header.js- Call
trackEventwith:- label set to
splash. - Category set to
{viewContext}
- label set to
- Call
assets/js/components/setup/ModuleSetup.js- Pass
moduleSlugas the label. - Pass category as
{viewContext}_setup
- Pass
Test coverage
- Add tests for the GA tracking event in the relevant components' tests.
QA Brief
- Enable the
setupFlowRefreshfeature flag, and verify that the events are tracked correctly according to the AC. - Verify that the events identified as legacy in the AC are still tracked when the feature flag is disabled.
Changelog entry
- Add opt-in GA tracking as part of the new setup flow in the splash, Analytics, and Key Metrics setup screens.
Metadata
Metadata
Assignees
Labels
P0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature