Background
Assuming T387598 - Build CTA modal exists, instrumentation needs to be added to the modal to enable data collection on how many people choose to enable vs disable the experiment.
User story
As a product team, we need to know how many people opt-in to the summaries experiment.
Requirements
Add instrumentation that logs the following 4 events when the CTA is open.
| screenshot | ||||
| description | CTA is shown | 'more info' link click | 'no' or dismiss click | 'yes' click |
| action | show | click | click | click |
| action_subtype | show_summary_onboarding | learn_more | no | yes |
| action_source | summary_onboarding | summary_onboarding | summary_onboarding | summary_onboarding |
Since the CTA is meant to be shown only as a centralNotice banner, it should be able to invoke it programatically via a js hook in the browser console.
note: If the modal can be dismissed by clicking outside of it, that should be tracked as a 'no' click.
BDD
Feature: Instrumentation for article summary interaction Scenario: Summary link is available on page Given I visit a mobile article page with a simple summary available When the summary banner renders Then an event with action "show" action_subtype "show_summary_onboarding" and action_source "summary_onboarding " is fired Scenario: User clicks "Learn More" Given I see a summary banner with a "Learn More" link When I click the "Learn More" link Then an event with action "click" action_subtype "learn_more" and action_source "summary_onboarding " is fired Scenario: User clicks "No, thanks" feedback on summary Given the summary overlay is visible When I click the "No, thanks" button Then an event with action "click" action_subtype "no" and action_source "summary_onboarding " is fired Scenario: User clicks "Enable" feedback on summary Given the summary overlay is visible When I click the "Enable" button Then an event with action "click" action_subtype "yes" and action_source "summary_onboarding " is fired
Test Steps
Test Case 1: Summary link is available on page
- https://en.m.wikipedia.beta.wmflabs.org/wiki/Paris as an anonymous user.
- Confirm the ArticleSummaries feature is enabled and the summary banner renders at the top.
- Open browser DevTools → Console.
- Run:
mw.hook('ext.articleSummaries.cta.open').fire();- Reload the page.
- AC1: Confirm the console logs an event with:
• action: "show"
• action_subtype: "show_summary_onboarding"
• action_source: "summary_onboarding"
Test Case 2: User clicks “Learn More”
- With the summary overlay visible (via banner or hook).
- Click the “Learn More” link.
- AC2: Confirm the console logs an event with:
• action: "click"
• action_subtype: "learn_more"
• action_source: "summary_onboarding"
Test Case 3: User clicks “No, thanks” feedback on summary
- With the summary overlay visible (via banner or hook)
- In the overlay, click the “No, thanks” link..
- AC3: Confirm the console logs an event with:
• action: "click"
• action_subtype: "no"
• action_source: "summary_onboarding"
Test Case 4: User clicks “Enable” feedback on summary
- With the summary overlay visible (via banner or hook)
- In the overlay, click the “Enable” link..
- AC4: Confirm the console logs an event with:
• action: "click"
• action_subtype: "yes"
• action_source: "summary_onboarding"
QA Results - Beta
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T390318#10860256 |
| 2 | ✅ | T390318#10860256 |
| 3 | ✅ | T390318#10860256 |
| 4 | ✅ | T390318#10860256 |
Acceptance criteria
- The CTA is instrumented an fires the events with the data described above.
This task was created by Version 1.2.0 of the Web team task template using phabulous







