Page MenuHomePhabricator

MinT for Readers instrumentation: Implement the use of wprov parameter for referred pageviews
Closed, ResolvedPublic2 Estimated Story Points

Description

One of the measurements is how many pageviews does the feature refer to human generated content, at various steps.

We already have an event, " user clicks to view human generated content" for click actions on the feature side. However, we also need provenance parameter to effectively track referred pageviews as part of the pageviews pipeline.

https://wikitech.wikimedia.org/wiki/Provenance

The parameter to be used is: mint1int

Event Timeline

PWaigi-WMF raised the priority of this task from Medium to High.Mar 3 2025, 11:35 AM
Nikerabbit set the point value for this task to 2.Mar 3 2025, 12:47 PM

@KCVelaga_WMF from quote
The parameter to be used is: mint1int

From https://wikitech.wikimedia.org/wiki/Provenance:

The format of the parameter name is ?wprov=<3_char_feature><platform_one_char><major_version_of_feature_uint>.

From what I can tell mint1int wouldn't meet the above criteria.

Change #1125627 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] AX Instrumentation: Add wprov paramter when redirecting to target page

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

From what I can tell mint1int wouldn't meet the above criteria.

That's right. But let me check with the Data Engineering team if that is a hard requirement or some variation is fine, because I see a few varied formats in currently used wprov examples.

For this Slack conversation, it is fine to use it is slight variation. A small change is, let's use: mintm1int -- addition of m - to specify mobile explicitly for now.

abi_ changed the task status from Open to In Progress.Mar 11 2025, 11:32 AM

Please ignore my previous comment, again from the Slack thread, it is suggested to the following now:

  • mtim1 - MinT for Readers internal; mobile web; version 1
  • mtem1 - MinT for Readers external; mobile web; version 1

I am not sure if external sharing of a direct link to automatic translation is part of the MVP or not, if not, please ignore the second one.

  • mtem1 - MinT for Readers external; mobile web; version 1

I am not sure if external sharing of a direct link to automatic translation is part of the MVP or not, if not, please ignore the second one.

Can you explain this a little more? Should this be used if a user is directly visiting Special:AutomaticTranslation and hasn't arrived there from one of the entry points?

Can you explain this a little more? Should this be used if a user is directly visiting Special:AutomaticTranslation and hasn't arrived there from one of the entry points?

In this Figma design, when the Automatic translation view is opened, there is an option "Share automatic translation" (4th option in the attached screenshot) -- if I remember correctly, this is for users to share a direct link to the Automatic translation externally.

Screenshot from 2025-03-12 10-09-37.png (583×324 px, 23 KB)

But I am not sure if this is part of the MVP -- if not, then of course we can skip the instrumentation as well.

Can you explain this a little more? Should this be used if a user is directly visiting Special:AutomaticTranslation and hasn't arrived there from one of the entry points?

In this Figma design, when the Automatic translation view is opened, there is an option "Share automatic translation" (4th option in the attached screenshot) -- if I remember correctly, this is for users to share a direct link to the Automatic translation externally.

Screenshot from 2025-03-12 10-09-37.png (583×324 px, 23 KB)

But I am not sure if this is part of the MVP -- if not, then of course we can skip the instrumentation as well.

You are right, it's not. Going ahead with using mtim1 for now.

Change #1125627 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX Instrumentation: Add wprov param for human content redirects

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

Can you explain this a little more? Should this be used if a user is directly visiting Special:AutomaticTranslation and hasn't arrived there from one of the entry points?

In this Figma design, when the Automatic translation view is opened, there is an option "Share automatic translation" (4th option in the attached screenshot) -- if I remember correctly, this is for users to share a direct link to the Automatic translation externally.

Screenshot from 2025-03-12 10-09-37.png (583×324 px, 23 KB)

But I am not sure if this is part of the MVP -- if not, then of course we can skip the instrumentation as well.

Apologies. There is a share option in the MVP but that shares the automatic translation not the human generated content.

So we should use the mtem1 parameter if,

  1. The user shares the automatic translation with a friend.
  2. The friend views the article and then clicks to access the human generated content

Do you think that having a separate parameter for it adds a lot of value?

So we should use the mtem1 parameter if,
The user shares the automatic translation with a friend.
The friend views the article and then clicks to access the human generated content
Do you think that having a separate parameter for it adds a lot of value?

Good point. At the moment, I can't really tell how much value it would add, as we don't have any understanding of how users would interact with the feature overall. mtem1 is anyway for secondary metrics. So I see two options:

  • The friend views the article and then clicks to access the human generated content: if there is no specific wprov for this, this would be mtem1 - is that right? A session would have been initiated, and the friend clicks to view human created content from the feature.
  • The user shares the automatic translation with a friend - we can have an simple event to know how many users clicked the share option, and an action_source for session initiation event.
    • if we see a lot of these events, and people initiating new sessions with that source, we can then consider a specific wprov mtem1
  • The user shares the automatic translation with a friend - we can have an simple event to know how many users clicked the share option, and an action_source for session initiation event.
    • if we see a lot of these events, and people initiating new sessions with that source, we can then consider a specific wprov mtem1

Let's go with the above for now.

Let's go with the above for now.

That works.

event for users clicking to share

Interaction data

action: click
action_subtype: share_automatic_translation_external
action_source: automatic_translation_menu

Translation object

  • source_title
  • source_language
  • target_title
  • target_language

Additional source for session initiation events

action_source: external_shared_automatic_translation

Change #1127492 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/ContentTranslation@master] AX Instrumentation: Log event on share

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

@KCVelaga_WMF Would adding target_title in translation object be useful or can we skip it?

@KCVelaga_WMF Would adding target_title in translation object be useful or can we skip it?

@abi_ Yes, it will be helpful. I believe there will be interest in knowing what is being shared. But for now, we can skip (especially if complex to implement). It is less important to know specific titles, but the interest is in topics associated with these articles, and topic can also be inferred from the source_title.

Change #1127492 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] AX Instrumentation: Log event on share

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

Deployed on https://language-cx.wmcloud.org/index.php/Special:AutomaticTranslation and can be tested there.

mw.loader.using('mediawiki.api')
    .then(
        () => new mw.Api().saveOption('eventlogging-display-web', '1')
    );

Pertinent comments:

  1. https://phabricator.wikimedia.org/T386681#10624273
  2. https://phabricator.wikimedia.org/T386681#10631532
  3. https://phabricator.wikimedia.org/T386681#10628228
NOTE: Note that we are not adding the mtem1 parameter at this point.

Tested the functionality and noticed that the wprov=mtim1 is present in URL when the "View human generated content" is clicked.