Page MenuHomePhabricator

Make click tracking work on reply tool talk page
Open, Needs TriagePublic

Description

We use click tracking to measure bounce rate however when disabling talk pages as on https://en.m.wikipedia.beta.wmflabs.org/wiki/Talk:Spain several key HTML markup is lost that prevents us tracking clicks to key components. These are the add discussion button and section headings.

Screen Shot 2021-11-10 at 8.44.15 AM.png (218×700 px, 23 KB)

Screen Shot 2021-11-10 at 8.44.59 AM.png (182×2 px, 17 KB)

For click tracking to work, the clickable item needs to have a data-event-name attribute.

TODO

  • Clicks should be recorded when add discussion is clicked (data-event-name="talkpage.add-topic")
  • Clicks should be recorded when headings are clicked (data-event-name="talkpage.section")

Developer notes

The data-event-name attribute can be set in HTML or in JS eg..
https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/master/resources/skins.minerva.scripts/talk.js#L113

Event Timeline

Restricted Application added a subscriber: Masumrezarock100. · View Herald Transcript

Change 738012 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Split DiscussionToolsEnableMobile=true into 'behind-overlay' and 'remove-overlay'

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

Change 738012 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Split DiscussionToolsEnableMobile=true into 'behind-overlay' and 'remove-overlay'

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

@Jdlrobson: would it be accurate for the Editing Team to think that we do NOT need to prioritize implementing the click tracking that is present in the MobileFrontend talk page overlay within the "Read as wiki page" view?

Thinking: the MobileFrontend talk page overlay, and the instrumentation that's been implemented within it, will NOT be removed until the Web Team has completed the analysis (T294503) that depends on said instrumentation/click tracking. More context in
T295816#7561919.

I think that's a product decision @ppelberg and @ovasileva and not a technical decision?

It seems like it would be useful to be able to compare bounce rates before and after turning on structured discussions to understand the impact of the product change on anons and logged-in users by switching to the "read as wiki page" view. From a technical point of view, the bounce rate instrumentation is pretty cheap to wire up on the new implementation if you need it (a data attribute on the clickable element). Happy to walk you through that code if it's not clear.

FWIW, Right now, for December I see 5,411 session clicks to the read as wiki page button [1] out of a total of 41,554 talk page views [2]. I see 10,511 [6] section heading clicks. When I look at logged-in traffic only, I see 2,347 "read as wiki" clicks [3] in 4,215 sessions [4]. In contrast section headings get 3,581 clicks [6] (e.g. more people are clicking sections than "read as wiki page".
e.g. It seems anonymous users are less likely to click read as wiki than logged in users. At least 85% of logged in user sessions engage with section collapsing in some form. Will be interesting to see Jennifer Wang's analysis to get a better picture - perhaps a decision around this should be blocked on those learnings?

[1] (select count( distinct event.token) from mobilewebuiactionstracking WHERE year = 2021 AND month = 12 AND event.action = 'click' AND event.name = 'talkpage.readAsWiki')
[2] select count(distinct event.token) from mobilewebuiactionstracking WHERE year = 2021 AND month = 12 AND event.action = 'init' AND event.name = "ns=1"
[3] select count( distinct event.token) from mobilewebuiactionstracking WHERE year = 2021 AND month = 12 AND event.action = 'click' AND event.name = 'talkpage.readAsWiki' AND event.isAnon = false
[4]
select count(distinct event.token) from mobilewebuiactionstracking WHERE year = 2021 AND month = 12 AND event.action = 'init' AND event.name = "ns=1" AND event.isAnon = false
[5] select count( distinct event.token) from mobilewebuiactionstracking WHERE year = 2021 AND month = 12 AND event.action = 'click' AND event.name = 'talkpage.section'
[5] select count( distinct event.token) from mobilewebuiactionstracking WHERE year = 2021 AND month = 12 AND event.action = 'click' AND event.name = 'talkpage.section' AND event.isAnon = false