Page MenuHomePhabricator

For Wikipedia Zero partners - Create ability to measure number of external link clicks per partner
Closed, DeclinedPublic

Description

We need some way to record minimal information to determine how many times a partners subscribers clicked on an external link (from a Wikipedia article). Resolution needed is total per day per partner.

Ideally it would be able to gather this information pre and post launch of each partner, so it would not rely entirely upon the exit interstitial.

Implementation ideas

We could add an event schema and submit external click event from the browser. For older browsers, if required, we could also add those events from the server-side zero link redirector (the piece of php code that shows server-side interstitials).

Background:

  1. if zero is disabled, an external link click navigates there directly
  2. if zero is enabled, an external link click shows an interstitial warning, requiring user confirmation
  3. if user has clicked "always accept" before, navigation happens without an additional confirmation

In case of #2, we would generate two events - one on link click, and one when user decides to proceed or to cancel, or to close the browser. I am worried that tracking browser closing might be fairly hard and inaccurate, thus having the first event would provide a good way to evaluate number accuracy.

Schema fields

  • carrier-id - string, e.g. "123-45"
  • browser - it would be great to track what browser has generated this link - do events auto-log this?
  • action - enum value:
    • extlink - ext link clicked without getting any warnings
    • extlink-auto - ext link clicked and navigated to without a warning because user has already agreed to always go
    • extlink-warn - an interstitial is shown
    • extlink-conf - user confirmed navigation to the external link
    • extlink-back - user decided not to proceed and went back to the page
    • extlink-close - user closed the browser when they see an interstitial (might be hard to implement)
    • extlink-always - user decided to continue and to always do it in the future

We should also add the image viewing events here (TBD)

Event Timeline

DFoy assigned this task to Yurik.
DFoy raised the priority of this task from to High.
DFoy updated the task description. (Show Details)
DFoy added a project: Zero.
DFoy subscribed.
Yurik set Security to None.
Yurik added subscribers: dr0ptp4kt, jhobs, MaxSem.

I created https://meta.wikimedia.org/wiki/Schema:WikipediaZeroUsage - please check. We might also want to include image warnings here. The schema must be agreed on before we advance further

@Ironholds, does this schema look reasonable? Anything missing? Adding this to Discovery-Analysis (Current work) per our face to face conversation earlier (please advise if incorrect project).

@Mholloway is working on the Android client's UX to replicate the web, and wireup for event logging in the app is advisable (even if the web wireup comes later).

I'm about to begin adding EventLogging functionality as described in https://meta.wikimedia.org/wiki/Schema:WikipediaZeroUsage to the Android app. If any changes are needed, please say so soon!

Can't think of anything needed at this point, but I'm sure once you start implementing you will get more ideas :)

A couple of notes on the schema fields:

extlink: unless I'm missing something, this shouldn't be possible; all actions fall into one of the more specific extlink-* categories. Wouldn't extlink-auto catch all instances of this? Am I understanding it correctly?

extlink-close: this isn't possible in the app; in the event the app is closed, Android just kills the process. We don't get a signal.

extlink-always: we don't currently show an "always continue" or "remember" type option in the exit warning dialog. (Neither does mobile web, it looks like.) Is this a required feature? We do have an app setting on whether to show exit warnings (defaults to true), so I guess we could log that if the user changes the setting to disable the warnings.

extlink-auto is only if the user has said in the past 'I know i'm navigating to a non-zero site, don't bug me with the question please'. The extlink is for when this is not a zero site, but it is on a zero network. For example, carrier has only zero-rated 10 languages, but the user is browsing some other language and clicked on an external link, and went to that site without any warnings. With the advance of https, this became less likely, with the possible exception of Opera Mini.

close - you might want to log the user switching to another app instead of going forward or back. Optional for mobile.

always - this is a major requested feature - users who don't care to pay for browsing don't ever want to see that warning again. We used to have this feature, but i haven't looked at its state recently.

On the always option, I believe it was removed for partners that override
the exit interstitial but remains there for those that don't IIRC.

Thanks,

Jeff Hobson

@Yurik -- on extlink/extlink-auto -- do you know if there are any operators left with only some languages zero-rated (for clients other than Opera Mini)? I've looked at a bunch but can't find an example.

Is there a way to find out without looking at config pages one by one?

@Mholloway, this page may also help:

https://wikimediafoundation.org/wiki/Mobile_partnerships#Where_is_Wikipedia_free_to_access.3F

From what I've seen, only 470-03 has this in wap, but only for non-https (which might never be achievable). This could be removed as well since a year ago this only amounted to < 1% of the traffic there.

One question about the schema: is 'net' meant to capture subgroups under ipsets (such as (usually) "default," or (occasionally) "wap")? Based on testing, this is what is sent in X-Carrier-Meta. That's how I have it now.

If not, what goes there?

yep, that's the value of x-carrier-meta. Default is auto-converted to an empty strting/missing value. Don't add anything to the net field unless the x-carrier-meta is set.