-
Notifications
You must be signed in to change notification settings - Fork 330
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 interaction with the Analytics setup screen.
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 | Trigger | Condition | Details |
|---|---|---|---|---|
setup_flow_v3_view_analytics_step |
{viewContext}_setup |
element visibility | Analytics setup screen appears | replaces view_module_setup in the initial setup flow. In the module setup flow we still track view_module_setup as specified earlier in the sheet |
setup_flow_v3_complete_analytics_step |
{viewContext}_setup |
click | after the user has clicked the setup button, all logic runs successfully | replaces complete_module_setup in the initial setup flow. In the module setup flow we still track complete_module_setup |
setup_flow_v3_create_analytics_account |
{viewContext}_setup |
click | user clicks the button to create a new account - ONLY initial setup (NOT module setup) | replaces create_account in the initial setup flow. In the module setup flow we still track create_account |
| _____________________________________________ | _______________________ | __________________ | _________________________________ | _____________________________________________ |
Implementation Brief
- To determine if the Analytics setup is initiated from the initial setup flow, use the
getQueryArgfunction to determine if the current URL includes theshowProgressquery argument andsetupFlowRefreshfeature is enabled.
-
In
assets/js/components/setup/ModuleSetup.js- In
useMountcall, if the initial setup flow andmoduleSlugisanalytic-4, calltrackEventto track thesetup_flow_v3_view_analytics_stepaction according to the ACs. If this condition is not met, the existingview_module_setupevent will still be tracked. - In
finishSetupfunction, if the initial setup flow andmoduleSlugisanalytic-4, calltrackEventto track thesetup_flow_v3_complete_analytics_stepaction according to the ACs. If this condition is not met, the existingcomplete_module_setupevent will still be tracked.
- In
-
In
assets/js/modules/analytics-4/components/common/AccountCreate/index.js- In
handleSubmitfunction, if the initial setup flow is in progress, calltrackEventto track thesetup_flow_v3_create_analytics_accountaction according to the ACs. This will replace currentcreate_accountevent. If not in the initial setup mode, the existingcreate_accountevent will still be tracked.
- In
Test coverage
- Add tests for these Ga tracking events in
ModuleSetupandAccountCreatecomponents' tests.
QA Brief
-
Turn on the
setupFlowRefreshfeature in the tester plugin. -
Install the Google Analytics Debugger Chrome extension and Open the browser developer tool's Console tab.
-
Set up Site Kit with GA tracking enabled and check the
Connect Analyticscheckbox during setup. Proceed with the setup until coming back toSet up Analyticsscreen.- When the
Set up Analyticsscreen is loadedsetup_flow_v3_view_analytics_stepevent will be tracked as described in AC. - When
Set upis clicked,setup_flow_v3_complete_analytics_stepevent will be fired as described in AC. - Repeat above steps again, but choose to create account in analytics, when clicking
Create Accountbutton,setup_flow_v3_create_analytics_accountevent will be fired as described in AC.
- When the
Changelog entry
- Add GA event tracking for user interaction with the Analytics setup screen in the new setup flow.
Metadata
Metadata
Assignees
Labels
P0High priorityHigh priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature