Skip to content

Data tracking

Sam Walton edited this page Jun 12, 2020 · 2 revisions

The Wikilink tool monitors the page-links-change EventStream (https://wikitech.wikimedia.org/wiki/Event_Platform/EventStreams) for link additions and removals to tracking URL patterns.

Link event tracking

The linkevents_collect.py management command is the script which runs to collect this data.

For each event in the stream, the script:

Username lists

For each link event, we cross-reference the user with a list of users from the Library Card platform. Ideally this would be destination-agnostic, so the tool can support other use cases, but for now we've implemented this in a way that only supports The Wikipedia Library.

users_update_lists.py runs on a regular basis to update user lists. For each organisation, it simply checks the username list URL field and gets a response from the API which should be at that URL.

We assume a not-hugely-helpful formatting for this data as defined by the user serializer through the AuthorizedUsers view.

Clone this wiki locally