Page MenuHomePhabricator

Metrics Platform Integration: use Metrics Platform submitClick to track calls to action of Community Updates
Closed, ResolvedPublic

Description

We need to add Metrics Platform event collection snippets into the relevant parts of Community Updates following the steps outlined in the How to Guide. Impressions are already tracked with the work from T371498, this task is for tracking the call to action click rate.

Acceptance Criteria

  • Track clicks on the module call to action including metadata as defined in Instrumentation specification
  • Ensure click events are valid and ingested

Event Timeline

Since impressions are already tracked with the work from T371498, the remaining scope of this task would be to track clicks on the module call to action. Updating description.

Sgs renamed this task from Metrics Platform Integration: Add Metrics Platform event collection snippets into the relevant parts of Community Updates to Metrics Platform Integration: use Metrics Platform submitClick to track calls to action of Community Updates.Sep 9 2024, 11:51 AM
Sgs triaged this task as Medium priority.
Sgs updated the task description. (Show Details)

@Sgs Thanks for the clarity, I'm going to add this to the Sprinthackular board so that we can track it there.

Change #1071861 had a related patch set uploaded (by Cyndywikime; author: Cyndywikime):

[mediawiki/extensions/GrowthExperiments@master] Community Updates: Implement click tracking for CTA using Metrics Platform

https://gerrit.wikimedia.org/r/1071861

Change #1071861 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Community Updates: Implement click tracking for CTA using Metrics Platform

https://gerrit.wikimedia.org/r/1071861

Etonkovidova subscribed.

Checked in beta - no validation errors were observed; all the needed info seems to be captured (see the example of clicking on the call to action event below; the info in some fields is obscured with dots (...)):

{"action":"click","action_source":"community-updates","action_context":"community-updates-cta","$schema":"/analytics/product_metrics/web/base/1.2.0","mediawiki":{"database":"cswiki","site_content_language":"cs"},"page":{"content_language":"en"},"agent":{"client_platform":"mediawiki_js","client_platform_family":"desktop_browser"},"performer":{"session_id":"...","active_browsing_session_token":"...","name":"ET13","is_bot":false,"is_logged_in":true,"edit_count_bucket":"100-999 edits","groups":["sysop","*","user","autoconfirmed"],"registration_dt":"2020-02-25T20:22:55.000Z","is_temp":false,"language":"en","pageview_id":"0e28de1d56007b3ec113"},"sample":{"unit":"pageview","rate":1},"dt":"2024-09-12T23:35:59.509Z","meta":{"stream":"mediawiki.product_metrics.homepage_module_interaction","domain":"cs.wikipedia.beta.wmflabs.org","id":"98f5dd58-a2ff-4fb2-874c-c06962a5f95e","dt":"2024-09-12T23:36:07.085Z","request_id":"...","topic":"eqiad.mediawiki.product_metrics.homepage_module_interaction","partition":0,"offset":16},"http":{"request_headers":{"user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"}}}
nettrom_WMF subscribed.

Confirmed that these click events are firing correctly on both desktop and mobile web, moving to "done".

I see that the stream name mediawiki.product_metrics.homepage_module_interaction is captured well too. I'll mark it as done since @nettrom_WMF and @Etonkovidova have validated that it's complete.

DMburugu reopened this task as In Progress.
This comment was removed by DMburugu.