Skip to content

Add GA event tracking for the updated help menu. #12032

@techanvil

Description

@techanvil

Feature Description

GA events should be added to keep track of interaction with the updated help menu (see #11815 and #11877).


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The following GA event should be tracked for the given action. See the GA events sheet.
  • The legacy event should no longer be tracked.
  • This change is only active when the setupFlowRefresh feature flag is enabled.
Event Name Category Label Trigger Condition Details
click_menu_item {viewContext}_headerbar_helpmenu one of: browse_documentation, get_support, start_tour, send_feedback, get_adsense_help click user clicks an item in the help menu replaces legacy "click_outgoing_link"
__________________ ______________________________________ _____________________________________ ______ ____________________ ______________________

Implementation Brief

  • In assets/js/components/help/HelpMenu.js
    • Add gaEventLabel property for following links in setupFlowRefreshMenuItems array of objects.
      Link gaEventLabel value
      Browse documentation browse_documentation
      Get free support get_support
      Start a feature tour start_tour
      Send feedback send_feedback
      Get help with AdSense get_adsense_help
  • In assets/js/components/help/HelpMenuLink.js
    • Pass click_menu_item instead of click_outgoing_link to trackEvent() when setupFlowRefresh feature is enabled.

Test Coverage

  • Add tests for HelpMenu component.

QA Brief

  • Enable the setupFlowRefresh feature flag and navigate to the Site Kit dashboard.
  • Enable the Google Analytics Debugger browser extension and open the browser developer tools console to observe tracked events.
  • Click the Help menu icon in the header bar to open the help menu.
  • Click each of the following menu items one at a time and verify that a GA event is fired with the event name click_menu_item, category {viewContext}_headerbar_helpmenu, and the corresponding label:
    • Browse documentation — label: browse_documentation
    • Get free support — label: get_support
    • Start a feature tour — label: start_tour
    • Send feedback — label: send_feedback
  • Activate the AdSense module, then open the help menu again and click Get help with AdSense — verify the event is fired with label get_adsense_help.
  • Verify that the legacy click_outgoing_link event is not fired for any of the above actions while setupFlowRefresh is enabled.
  • Disable the setupFlowRefresh feature flag and repeat clicking a help menu item — verify that the legacy click_outgoing_link event is fired instead of click_menu_item.

Changelog entry

  • Add GA event tracking for user interaction with the updated help menu.

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