Skip to content

Implement GA4 tracking #11863

@benbowler

Description

@benbowler

Feature Description

Implement new tracking events defined in [SK] Periodic Email Reports - GA4 Events(V1 tab)


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

Acceptance criteria

Implementation Brief

Invite User Panel

Settings Disable Modal

  • Update settings disable modal added in Show modal before disabling Email reporting in admin settings #11862:
    • Track view_modal on {viewContext}_email_reports_settings_confirm_disable_modal when modal renders.
    • Track dismiss_modal when user cancels/closes modal without confirming disable.
    • Track learn_more when user clicks learn more link.
    • Track visit_email_report_settings when user clicks email report settings link.
    • The existing disable event should be updated to trigger on confirmation of feature disablement.

User Settings Panel

  • Update file assets/js/components/email-reporting/UserSettingsSelectionPanel/index.js:
    • Update onSideSheetOpen to track view_panel with category {viewContext}_email_reports_user_settings.
    • Update close handler to track close_panel with same category.
    • Track subscribe when user subscribes (not previously subscribed), pass selected frequency as label.
    • Track change_frequency when user changes subscription (already subscribed), pass selected frequency as label.
    • Track unsubscribe when user unsubscribes.

Error Notices

Test Coverage

  • Update the tests for each updated component to confirm each tracking event is fired.

QA Brief

This issue standardises all GA events for both the PUE v0 and v1 epics.

Changelog entry

  • Include user analytics in email reporting feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0High priorityTeam SIssues for Squad 1Type: 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