Repository navigation
Add GA event tracking for the RRM CTA manage settings link #13575
Copy link
Copy link
Closed
Labels
Module: RRMReader Revenue Manager module related issuesReader Revenue Manager module related issuesP1Medium priorityMedium priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature
Description
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
rrmExpressSetupfeature flag enabled, which is when the configured CTA list is shown.
Implementation Brief
-
In
assets/js/modules/reader-revenue-manager/utils/settings.js, update thegetConfiguredCTAListfunction:- Add
ctaTypeto the returned object (in addition toctaIDandlabel), so thatSettingsFormcan access the CTA slug for event tracking. - Update
assets/js/modules/reader-revenue-manager/utils/settings.test.jsto reflect this change.
- Add
-
In
assets/js/modules/reader-revenue-manager/components/settings/SettingsForm.js:- Import
useViewContexthook from@/js/hooks/useViewContext. - Import
trackEventfunction from@/js/util. - In the component, call
useViewContext()to get the current view context. - Update the
Linkcomponent that renders the "Manage settings" link within the CTAs list mapping:- Add an
onClickhandler that callstrackEventwith:- Event category:
${viewContext}_rrm - Event action:
click_cta_manage_settings_link - Event label: the CTA slug (e.g.,
newsletter-signup) from thectaTypeproperty of the mapped CTA object.
- Event category:
- The event tracking fires when the user clicks the "Manage settings" link.
- Add an
- Event tracking is only active when the
rrmExpressSetupfeature flag is enabled, which is already the case since the configured CTAs list only renders when the flag is enabled.
- Import
Test Coverage
- Add tests in
assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.test.jsto verify that clicking the "Manage settings" link triggers the correct GA event with the expected category, action, and CTA slug label.
QA Brief
- Follow steps 1–7 of Update RRM settings screens to show configured CTAs #13031.
- When 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.
Changelog entry
- Add GA event tracking for the Reader Revenue Manager configured CTA manage settings link.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Module: RRMReader Revenue Manager module related issuesReader Revenue Manager module related issuesP1Medium priorityMedium priorityTeam MIssues for Squad 2Issues for Squad 2Type: EnhancementImprovement of an existing featureImprovement of an existing feature
Activity
hussain-t commentedon Sep 18, 2026
Thanks for drafting the IB, @ankitrox! Mostly good; a couple of things:
The IB says to use the
ctaTypeproperty from the mapped CTA object, but that isn't there.getConfiguredCTAList()only returnsctaIDandlabel, and discardsctaTypeafter using it for the label lookup. We'd need to add it to the returned objects (and update theutils/settings.test.js), or pull it through the mapping inSettingsForm.js, which already has the rawconfiguredCTAs. Worth calling out in the IB.There's no
SettingsForm.test.js, so the new test would go inSettingsEdit.test.jswhere 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.ankitrox commentedon Sep 18, 2026
Thank you @hussain-t for reviewing the IB. I've updated it as per the suggestion.
hussain-t commentedon Sep 18, 2026
Thanks, @ankitrox!
IB ✅
mohitwp commentedon Oct 8, 2026
QA Update ✅
click_cta_manage_settings_linkGA event tracked on the Reader Revenue Manager settings edit screen as per AC.Details