Page MenuHomePhabricator

Instrument follow-up invite shown after publishing
Closed, ResolvedPublic

Description

Once a section is published, an invite is shown to translate another one (T241592). This allows users to translate as much of a given article as they want. However, based on the initial reports about instrumentation (T295757#8225407) we are not instrumenting users accessing the tool in this case.

Note that we want to show this invite on both mobile and desktop after a section is expanded. Thus, the instrumentation has to identify the platform accordingly.

Event Timeline

Change 901541 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SX: Instrument follow-up invite shown after publishing

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

Change 901541 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Instrument follow-up invite shown after publishing

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

Change 903988 had a related patch set uploaded (by Santhosh; author: Santhosh):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230329

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

Change 903808 had a related patch set uploaded (by KartikMistry; author: Santhosh):

[mediawiki/extensions/ContentTranslation@wmf/1.41.0-wmf.2] CX3 Build 0.2.0+20230329

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

Change 903808 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@wmf/1.41.0-wmf.2] CX3 Build 0.2.0+20230329

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

Mentioned in SAL (#wikimedia-operations) [2023-03-29T07:26:28Z] <kartik@deploy2002> kartik: Backport for [[gerrit:903808|CX3 Build 0.2.0+20230329 (T333128 T328533 T317995)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-03-29T07:37:34Z] <kartik@deploy2002> Finished scap: Backport for [[gerrit:903808|CX3 Build 0.2.0+20230329 (T333128 T328533 T317995)]] (duration: 12m 35s)

Change 903988 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230329

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

@ngkountas I am not sure how this is to be tested. Can you further elaborate?or we can sit on a call to go through this. Please advise

Steps for testing instrumentation of this entrypoint for mobile devices:

  1. enable displaying event logs by running the below "command" in the Dev Tools console:
mw.loader.using( 'mediawiki.api' ).then( function () {
    new mw.Api().saveOption( 'eventlogging-display-web', '1' );
} );
  1. Visit a page that simulates successful SX publishing. E.g. https://el.m.wikipedia.org/w/index.php?title=Ποδόσφαιρο&sx-published-section=Ιστορία&sx-source-language=en&sx-source-page-title=Football&sx-target-language=el

The above link leads to the same page as if the user had successfully published a translation of "History" section of "Football" page from "en" to "el".

  1. Click on the invitation "Μεταφράστε μια άλλη ενότητα" (Translate another section) invitation that leads back to SX.
  2. See the logged events both inside the page as popups and inside the console.

@Pginer-WMF The description says Note that we want to show this invite on both mobile and desktop after a section is expanded. Thus, the instrumentation has to identify the platform accordingly.. However, although we do display the invitation on desktop, too, we do not support section suggestions and selecting a section to translate inside CX Dashboard. For this reason, the invitation doesn't make a lot of sense right now and I think it doesn't make sense to instrument it, until we migrate to the unified dashboard (in which case the instrumentation will already be in place, the same way it currently works for mobile devices). Does that make sense to you?

@Pginer-WMF The description says Note that we want to show this invite on both mobile and desktop after a section is expanded. Thus, the instrumentation has to identify the platform accordingly.. However, although we do display the invitation on desktop, too, we do not support section suggestions and selecting a section to translate inside CX Dashboard. For this reason, the invitation doesn't make a lot of sense right now and I think it doesn't make sense to instrument it, until we migrate to the unified dashboard (in which case the instrumentation will already be in place, the same way it currently works for mobile devices). Does that make sense to you?

Yes that makes perfect sense. With the confirmation that the code is ready for being used in both platforms distinguishing the results, we can consider the requirement achieved.

@EChukwukere-WMF do you have enough info to move this back into QA column?

The followup invite is properly instrumented in production. Below I attach a screencast of such an invitation that leads back to the dashboard with the proper URL parameters filled in (including the "campaign" parameter which controls the analytics event source). Please note that even though the appearance of such an invite after publishing to sandbox may be odd, the behaviour is identical to sections published in the main namespace, I just avoided polluting the main namespace by publishing there.

Screencast from greek (el) Wikipedia (apologies for low quality):