Skip to content

Add GA event tracking for the RRM CTA manage settings link #13575

Closed

Description

@nfmohit

Feature Description

GA event tracking should be added to the link that opens a configured CTA's settings in the Publisher Center, shown on the Reader Revenue Manager settings edit screen (#13031).


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 on the Reader Revenue Manager settings edit screen. See the GA events sheet.

Event name Category Label Trigger Condition
click_cta_manage_settings_link {viewContext}_rrm slug of the CTA, for example newsletter-signup click The user clicks the "Manage settings" link for a configured CTA in the "CTAs" section.
  • The event is tracked only with the rrmExpressSetup feature flag enabled, which is when the configured CTA list is shown.

Implementation Brief

  • In assets/js/modules/reader-revenue-manager/utils/settings.js, update the getConfiguredCTAList function:

    • Add ctaType to the returned object (in addition to ctaID and label), so that SettingsForm can access the CTA slug for event tracking.
    • Update assets/js/modules/reader-revenue-manager/utils/settings.test.js to reflect this change.
  • In assets/js/modules/reader-revenue-manager/components/settings/SettingsForm.js:

    • Import useViewContext hook from @/js/hooks/useViewContext.
    • Import trackEvent function from @/js/util.
    • In the component, call useViewContext() to get the current view context.
    • Update the Link component that renders the "Manage settings" link within the CTAs list mapping:
      • Add an onClick handler that calls trackEvent with:
        • Event category: ${viewContext}_rrm
        • Event action: click_cta_manage_settings_link
        • Event label: the CTA slug (e.g., newsletter-signup) from the ctaType property of the mapped CTA object.
      • The event tracking fires when the user clicks the "Manage settings" link.
    • Event tracking is only active when the rrmExpressSetup feature flag is enabled, which is already the case since the configured CTAs list only renders when the flag is enabled.

Test Coverage

  • Add tests in assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.test.js to verify that clicking the "Manage settings" link triggers the correct GA event with the expected category, action, and CTA slug label.

QA Brief

Changelog entry

  • Add GA event tracking for the Reader Revenue Manager configured CTA manage settings link.

Activity

  1. assigned and unassigned on Sep 15, 2026
  2. self-assigned this
    on Sep 17, 2026
  3. hussain-t commented on Sep 18, 2026

    @hussain-t
    Collaborator

    Thanks for drafting the IB, @ankitrox! Mostly good; a couple of things:

    Event label: the CTA slug which is ctaType property (e.g., newsletter-signup) from the mapped CTA object.

    The IB says to use the ctaType property from the mapped CTA object, but that isn't there. getConfiguredCTAList() only returns ctaID and label, and discards ctaType after using it for the label lookup. We'd need to add it to the returned objects (and update the utils/settings.test.js), or pull it through the mapping in SettingsForm.js, which already has the raw configuredCTAs. Worth calling out in the IB.

    Add tests for SettingsForm to verify that clicking the "Manage settings" link triggers the correct GA event with the expected category, action, and CTA slug label.

    There's no SettingsForm.test.js, so the new test would go in SettingsEdit.test.js where the existing "Manage settings" link tests are. The flag bullet is already covered there too by "should not render the CTAs section when the feature flag is disabled", so I think we can drop it.

  4. ankitrox commented on Sep 18, 2026

    @ankitrox
    Collaborator

    Thank you @hussain-t for reviewing the IB. I've updated it as per the suggestion.

  5. hussain-t commented on Sep 18, 2026

    @hussain-t
    Collaborator

    Thanks, @ankitrox!

    IB ✅

  6. removed their assignment
    on Sep 18, 2026
  7. added
    P1Medium priority
    and removed
    P0High priority
    on Sep 21, 2026
  8. assigned and unassigned on Sep 25, 2026
  9. self-assigned this
    on Sep 29, 2026
  10. removed their assignment
    on Oct 6, 2026
  11. self-assigned this
    on Oct 6, 2026
  12. mohitwp commented on Oct 8, 2026

    @mohitwp
    Collaborator

    QA Update ✅

    • Tested on dev environment.
    • Verified click_cta_manage_settings_link GA event tracked on the Reader Revenue Manager settings edit screen as per AC.
    • Verified clicking the Manage Settings link of a CTA observe the Network tab of the browser's developer tools and confirm that a tracking request is made with the expected content in its payload.
    Details Image Image Image
  13. removed their assignment
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module: RRMReader Revenue Manager module related issuesP1Medium 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