Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GA events in RRM introductory overlay notification #10330

Closed
10 of 12 tasks
nfmohit opened this issue Mar 6, 2025 · 4 comments
Closed
10 of 12 tasks

Add GA events in RRM introductory overlay notification #10330

nfmohit opened this issue Mar 6, 2025 · 4 comments
Labels
Module: RRM Reader Revenue Manager module related issues P0 High priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature

Comments

@nfmohit
Copy link
Collaborator

nfmohit commented Mar 6, 2025

Feature Description

GA events should be added to the Reader Revenue Manager introductory overlay notification.


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 in different Reader Revenue Manager introductory overlay notification. See the GA events sheet.

Event name / action Category Label Trigger This metric is recorded when...
view_notification {viewContext}_rrm-introductory-notification {ONBOARDING STATE}:{PAYMENT OPTION}. Example: "ONBOARDING_COMPLETE:noPayment" element visibility The user views the RRM introductory notification.
confirm_notification {viewContext}_rrm-introductory-notification {ONBOARDING STATE}:{PAYMENT OPTION}. Example: "ONBOARDING_COMPLETE:noPayment" click The user clicks on the RRM introductory notification CTA.
dismiss_notification {viewContext}_rrm-introductory-notification {ONBOARDING STATE}:{PAYMENT OPTION}. Example: "ONBOARDING_COMPLETE:noPayment" click The user dismisses the RRM introductory notification.
click_learn_more_link {viewContext}_rrm-introductory-notification {ONBOARDING STATE}:{PAYMENT OPTION}. Example: "ONBOARDING_COMPLETE:noPayment" click The user clicks on the RRM introductory notification learn more link.

Implementation Brief

  • In assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.js:
    • Import trackEvent from assets/js/util/index.js to track events.
    • Add an onShow prop to the OverlayNotification component. Pass a function that calls the trackEvent function with the view_notification event (second parameter).
    • Within the onClick prop function for the Maybe later button, call the trackEvent function with the dismiss_notification event (second parameter).
    • Add an onClick prop function to the Explore features/Learn more button. Call the trackEvent function with the confirm_notification event (second parameter).
    • Add an onClick prop function to the SupportLink component. Call the trackEvent function with the click_learn_more_link event (second parameter).
    • Each trackEvent function call should use {viewContext}_rrm-introductory-notification as the first parameter (event category).
      • Obtain the viewContext using the useViewContext (assets/js/hooks/useViewContext.js) hook.
    • Each trackEvent function call should use a label as the third parameter as described in the ACs.
      • Create a new variable to store the event label, say gaEventLabel. Compose the event label according to the ACs.
        • Obtain the onboarding state using the getPublicationOnboardingState selector.
        • Obtain the payment option using the getPaymentOption selector.

Test Coverage

  • In assets/js/modules/reader-revenue-manager/components/dashboard/RRMIntroductoryOverlayNotification.test.js:
    • Add test coverage to validate all tracking events with the correct label.

QA Brief

  • Install Google Analytics Debugger chrome extension to verify the GA events.
  • Connect the Reader Revenue Manager with rrmModuleV2 feature flag enabled.
  • Ensure the publication onboarding state is complete for the connected publication.
  • Ensure the payment option is set to noPayment or empty (string) for the connected publication.
  • When the Reader Revenue Manager introductory overlay notification is displayed, verify the following GA events are tracked as per the ACs:
    • The view_notification event is tracked when the notification is displayed.
    • The confirm_notification event is tracked when the user clicks on the "Explore features" button.
    • The dismiss_notification event is tracked when the user clicks on the "Maybe later" button.
    • The click_learn_more_link event is tracked when the user clicks on the "Learn more" link.

Changelog entry

  • Add GA events tracking for user interaction with the Reader Revenue Manager introductory overlay notification.
@nfmohit nfmohit self-assigned this Mar 6, 2025
@nfmohit nfmohit added P0 High priority Type: Enhancement Improvement of an existing feature Team M Issues for Squad 2 Module: RRM Reader Revenue Manager module related issues labels Mar 6, 2025
@nfmohit nfmohit assigned nfmohit and unassigned nfmohit Mar 9, 2025
@hussain-t hussain-t self-assigned this Mar 10, 2025
@hussain-t
Copy link
Collaborator

Thanks, @nfmohit! Overall the IB looks good. However, the prop to pass to the OverlayNotification component should be onShow instead of onView. Could you update it?

Add an onView prop to the OverlayNotification component. Pass a function that calls the trackEvent function with the view_notification event (second parameter).

@hussain-t hussain-t assigned nfmohit and unassigned hussain-t Mar 10, 2025
@nfmohit
Copy link
Collaborator Author

nfmohit commented Mar 10, 2025

Excellent catch, updated, thanks @hussain-t!

@nfmohit nfmohit assigned hussain-t and unassigned nfmohit Mar 10, 2025
@hussain-t
Copy link
Collaborator

Thanks, @nfmohit!

IB ✅

@hussain-t hussain-t removed their assignment Mar 14, 2025
techanvil added a commit that referenced this issue Mar 14, 2025
…m-introductory-overlay

Enhancement/#10330 - Add GA events in RRM introductory overlay notification
@techanvil techanvil removed their assignment Mar 14, 2025
@kelvinballoo kelvinballoo self-assigned this Mar 17, 2025
@kelvinballoo
Copy link
Collaborator

QA Update ✅

Tested good.
GA events are tracked as per the ACs:

  • The view_notification event is tracked when the notification is displayed.

    Image
  • The confirm_notification event is tracked when the user clicks on the "Explore features" button.

    Image
  • The dismiss_notification event is tracked when the user clicks on the "Maybe later" button.

    Image
  • The click_learn_more_link event is tracked when the user clicks on the "Learn more" link.

    Image

@kelvinballoo kelvinballoo removed their assignment Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: RRM Reader Revenue Manager module related issues P0 High priority Team M Issues for Squad 2 Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants