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 a survey trigger for Reader Revenue Manager CTA #9447

Closed
3 tasks
nfmohit opened this issue Oct 2, 2024 · 2 comments
Closed
3 tasks

Add a survey trigger for Reader Revenue Manager CTA #9447

nfmohit opened this issue Oct 2, 2024 · 2 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 Oct 2, 2024

Feature Description

A survey trigger should be added for the Reader Revenue Manager CTA. The SK Service does not need to actually trigger a survey for this yet, which can be done later. For now, this would only be helpful to track use of the CTA.


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

Acceptance criteria

  • When the Reader Revenue Manager CTA banner is viewed, a survey should be triggered.
  • The survey triggerID should be: view_reader_revenue_manager_cta.

Note: This is a stub survey (at least for now) that will help us track use of this banner, so Site Kit doesn't have to display an actual survey.

Implementation Brief

  • In assets/js/modules/reader-revenue-manager/components/dashboard/ReaderRevenueManagerSetupCTABanner.js:
    • Update the useEffect that calls trackEvent for the view_notification event.
    • After the above call, dispatch a call to triggerSurvey() passing the trigger ID according to the ACs.

Test Coverage

  • No new tests needed.

QA Brief

  • Set up Site Kit with the rrmModule feature flag enabled.
  • Visit the dashboard and ensure the Reader Revenue Manager CTA banner is displayed.
  • Verify that the survey trigger is correctly dispatched when viewing the banner.
  • Ensure that the triggerID is set to view_reader_revenue_manager_cta.
  • To verify the survey trigger, open the network tab in the browser's developer tools and ensure a POST request is made to the wp-json/google-site-kit/v1/core/user/data/survey-trigger endpoint with the correct triggerID:
    {
        "data": {
            "triggerID": "view_reader_revenue_manager_cta"
        }
    }

Changelog entry

  • Add a stub survey trigger that is called when viewing the Reader Revenue Manager Setup CTA.
@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 Oct 2, 2024
@nfmohit nfmohit assigned nfmohit and unassigned nfmohit Oct 18, 2024
@techanvil techanvil self-assigned this Oct 29, 2024
@techanvil
Copy link
Collaborator

IB ✅

@techanvil techanvil removed their assignment Oct 29, 2024
@hussain-t hussain-t self-assigned this Nov 4, 2024
@hussain-t hussain-t removed their assignment Nov 4, 2024
@techanvil techanvil assigned techanvil and hussain-t and unassigned techanvil Nov 4, 2024
@hussain-t hussain-t assigned techanvil and unassigned hussain-t Nov 5, 2024
techanvil added a commit that referenced this issue Nov 5, 2024
…gger-for-rrm

Enhancement/#9447 - Add a survey trigger for Reader Revenue Manager CTA
@techanvil techanvil removed their assignment Nov 5, 2024
@kelvinballoo kelvinballoo self-assigned this Nov 6, 2024
@kelvinballoo
Copy link
Collaborator

QA Update ✅

Tested this and it's working as expected.
Moving ticket to approval.

When the Reader Revenue Manager CTA banner is viewed, a survey with triggerID view_reader_revenue_manager_cta and POST request is triggered to wp-json/google-site-kit/v1/core/user/data/survey-trigger

Image

Image

@kelvinballoo kelvinballoo removed their assignment Nov 6, 2024
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