Skip to content

Add GA event tracking for the "activate Analytics" notification. #12028

@techanvil

Description

@techanvil

Feature Description

GA events should be added to keep track of interaction with the "activate Analytics" notification (see #11817).


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.
  • These changes are only active when the setupFlowRefresh feature flag is enabled.
Event Name Category Trigger Condition
view_notification {viewContext}_activate-analytics-notification element visibility user views the "activate Analytics" notification
confirm_notification {viewContext}_activate-analytics-notification click user clicks the "Set up Analytics" button on the notification
dismiss_notification {viewContext}_activate-analytics-notification click user clicks the "Maybe later" or "Don't show again" button to dismiss the notification
tooltip_view {viewContext}_activate-analytics-notification element visibility user views the tooltip pointing to the Settings menu item that is shown when dismissing the notification
tooltip_dismiss {viewContext}_activate-analytics-notification click user clicks "Got it" or "X" to close the tooltip
_____________________ _______________________________________________ __________________ ________________________________________

Implementation Brief

  • In assets/js/googlesitekit/notifications/register-defaults.js

    • Update the notification ID from activate-analytics-cta to activate-analytics-notification
  • In assets/js/components/notifications/ActivateAnalyticsNotification.tsx

    • Pass gaTrackingEventArgs to BannerNotification component, like it is passed in ModuleSetupSuccessNotification component here.
    • The category property should be ${ viewContext }_activate-analytics-notification.

Test Coverage

  • Add tests for these GA tracking events in ActivateAnalyticsNotification component's tests.

QA Brief

  • Set up Site Kit with the setupFlowRefresh feature flag enabled. Don't connect Analytics.
  • When landing on the Site Kit dashboard, dismiss the Welcome modal.
  • Verify that the GA events are tracked for the "activate Analytics" notification as per the AC.

Changelog entry

  • Add GA event tracking for user interactions with the "activate Analytics" notification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priorityTeam MIssues for Squad 2Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions