Page MenuHomePhabricator

Log when the user sees and bounces from the terms of use agreement in the infobox
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

Following on from T296415: Basic ipinfo instrument setup and first events, we'd like to know how many users see the terms of use agreement infobox treatment and bounce from it.

AC
  • When I sees the terms of use agreement infobox treatment, an event should be logged
    • The event_action property should be "init_disclaimer"
  • When I have seen the terms of use agreement infobox treatment and accept the terms of the disclaimer
    • The event_action property should be "accept_disclaimer"
  • When I have seen the terms of use agreement infobox treatment and I close the browser tab/window before accepting the agreement, an event should be logged
    • The event_action property should be "close_disclaimer"
Notes
  1. At the time of writing, the user will only see the terms of use agreement infobox treatment when:
    • They have enabled IP Info via Special:Preferences; and
    • They navigate to /wiki/Special:Contributions/$ip
  2. For performance reasons, listen for the beforeunload event (not the unload event)
  3. wt:Event Platform/Instrumentation How To is a step-by-step guide to creating a creating a schema and validating an event with it
  4. https://www.mediawiki.org/wiki/MediaWiki-Docker/Configuration_recipes/EventLogging is a step-by-step guide to setting up your local development environment

Event Timeline

Per yesterday's AHT Estimation meeting, @Niharika will confirm with @jwang whether we intend to count unique users (and therefore send a unique token to deduplicate users during analysis).

@Niharika, counting unique users is to answer below measurement questions (also mentioned in T292803). If below reframed measurement questions are OK to you, a unique token is enough for us.

Original measurement questionsNew measurement questions
How many people see the disclaimer ?How many times people see the disclaimer?
How many people accept the terms of the disclaimer ?How many times people accept the terms of the disclaimer?
How many people churn away ?How many times people churn away?

@Niharika just to confirm, we are counting how many users open the agreement and then bounce WITHOUT accepting the terms?

@phuedx should we be using Wikimedia Events or hard code an mw-track event?

@Niharika just to confirm, we are counting how many users open the agreement and then bounce WITHOUT accepting the terms?

For some reason, I thought that this question was addressed to me and clarified the task description (the answer is yes). Sorry, @Niharika!

@phuedx should we be using Wikimedia Events or hard code an mw-track event?

Let's discuss this in today's AHT Engineering Meeting meeting.

Hi @phuedx, what is the best practice for using the salt and hash here?
Thank you!

Hi @phuedx, what is the best practice for using the salt and hash here?

Thanks for the question, @AGueyte. @Niharika confirmed out-of-band that we wouldn't be recording the number of unique users performing any of the actions in the task description so we won't need to salt and hash the user ID in this instance. I've updated the task description accordingly.

Regardless, see https://gerrit.wikimedia.org/g/mediawiki/extensions/WikimediaEvents/+/6a0d947efa2a5183f89159e36610f815c13439fa/includes/VectorPrefDiffInstrumentation.php#163 for an example salting and hashing the user ID in PHP.

ARamirez_WMF renamed this task from Log when the user sees and bounces from the terms of use agreement in the infobox to Log when the user sees and bounces from the terms of use agreement in the infobox [M].Jan 11 2022, 5:07 PM
ARamirez_WMF renamed this task from Log when the user sees and bounces from the terms of use agreement in the infobox [M] to Log when the user sees and bounces from the terms of use agreement in the infobox.Feb 15 2022, 6:50 PM
ARamirez_WMF set the point value for this task to 3.

Change 769274 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/IPInfo@master] Add event logging for user interactions with use agreement

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

Change 769274 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Add event logging for user interactions with use agreement

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

I have tried several times and the disclaimer event is not showing. Here is what I see on beta

Screen Shot 2022-03-21 at 9.23.48 PM.png (1ร—2 px, 558 KB)

@STran I checked on local box and beta.

If you check Preserve Log do you see it? The event is triggered on the page as you leave it they won't be there if you check the logs on the new page unless you explicitly preserved them. Additionally, this is only from the infobox on Special:Contributions. You can make the form appear by only checking the first checkbox "Show the IP Information tool on Special:Contributions page for IP addresses." from Special:Preferences.

@STran I checked preserve log, did as above. I didn't see those disclaimer events listed in the task acceptance criteria. I do see something called page views. Not sure if this is a different naming convention for the disclaimer events?

Screen Shot 2022-03-21 at 10.29.27 PM.png (1ร—2 px, 832 KB)

However I do see in my local the logs for enable/disable access
Screen Shot 2022-03-21 at 10.18.35 PM.png (1ร—2 px, 611 KB)

How I got this to work on beta:

  1. Go to Special:Preferences (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences)
  2. Make sure that Show the IP Information tool on Special:Contributions page for IP addresses is checked and I agree to use this information for my patrolling and anti-vandalism work is unchecked. If not, make the appropriate changes to those inputs in the form and submit.
    t296477_1.png (106ร—623 px, 13 KB)
  3. Go to Special:Contributions for an IP (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:Contributions/81.187.41.249)
  4. Open the browser's network
  5. Check I agree to use this information for my patrolling and anti-vandalism work and click the submit button.
    t296477_2.png (212ร—1 px, 25 KB)

At this point I saw 3 requests to https://intake-analytics.wikimedia.beta.wmflabs.org/v1/events. One of them had the event init_disclaimer and another had the event accept_disclaimer. (The third was unrelated.)

The event loads for me. Thanks @Tran and @dom_walden for your help.

Screen Shot 2022-03-22 at 5.21.47 PM.png (1ร—2 px, 549 KB)

Screen Shot 2022-03-22 at 5.12.10 PM.png (1ร—2 px, 571 KB)

Screen Shot 2022-03-22 at 5.22.01 PM.png (1ร—2 px, 556 KB)