Extension:EventLogging

The EventLogging extension makes it possible to collect structured data on how users interact with MediaWiki sites.

":{"react_render":true,"reflow":true},"sample_continuation_stacktraces":true,"dom_mutation_flag":true,"stack_trace_limit":30,"timesliceBufferSize":5000,"show_invariant_decoder":false,"compat_iframe_token":"AQ4WxgqF1FP19yZN","isCQuick":false});  __DEV__=0;CavalryLogger=window.CavalryLogger||function(a)
 * Numbered list item
 * Numbered list item

EventLogging at Wikimedia
The Wikimedia Foundation uses the EventLogging extension as part of a broader system for collecting, aggregating, storing, and analyzing user data within the limits set out by our privacy policy and data retention guidelines.

This page is about general use of the EventLogging extension. The Wikimedia Foundation uses EventLogging with WMF specific backend components and schema repositories. For Wikimedia specific and maintained documentation, see Analytics/Systems/EventLogging and Event Platform.

Logging events using EventLogging

 * Extension:EventLogging/Guide - to developing and deploying EventLogging schemas, and more
 * Extension:EventLogging/Programming - tips and suggestions for developers writing code to log events

Developer setup
As a developer, you will want to set up and use EventLogging on your development wiki to simulate its use in production.

Using Docker
See MediaWiki-Docker/Configuration recipes/EventLogging

Using mediawiki-vagrant
If you develop using mediawiki-vagrant, everything you need is encapsulated in the  role. To enable it, run:

For JavaScript development
If working on the javascript client, you'll need to install dependencies with  from the folder you're developing in. Then you can use  to lint for example. The "How to run tests" section below points out how to see JavaScript test results.

How to run tests
There are PHP tests, python tests, and JavaScript tests.

To run JavaScript tests, visit Special:JavaScriptTest/qunit on your development wiki. (see: Manual:JavaScript unit testing)

To run PHP tests, we use PHPUnit. Make sure it is installed, see: Manual:PHP unit testing/Installing PHPUnit). Then