Extension:EventLogging/pt-br
Estado da versão: estável |
|
|---|---|
| Implementação | Página especial, Banco de dados, ContentHandler |
| Descrição | Provides a framework for logging analytics events |
| Autor(es) | Ori.livnehdiscussão |
| Última versão | continuous updates |
| MediaWiki | 1.33+ |
| PHP | 5.5+ |
| Modifica o banco de dados |
Não |
| Licença | GNU GPL (Licença Pública Geral) 2.0 ou superior |
| Download | |
|
|
| Para traduzir a extensão EventLogging, verifique sua disponibilidade no translatewiki.net | |
| Função no Vagrant | eventlogging |
| Problemas | Tarefas em aberto · Relatar um bug |
The EventLogging extension makes it possible to collect structured data on how users interact with MediaWiki sites.
Features
- EventLogging supports client-side logging from JavaScript and server-side logging from PHP.
- Logging behavior can be dynamically configured using Extension:EventStreamConfig.
- The events are JSON objects defined by versioned JSONSchemas stored in a schema git repository.
- The extension does not include any back-end code for transporting, parsing, or loading these events. If you're interested in the separate components that Wikimedia uses for these purposes, see #EventLogging at Wikimedia.
EventLogging at Wikimedia
This page is about general use of the EventLogging extension.
Wikimedia uses the EventLogging extension as part of a broader system for collecting, aggregating, storing, and analyzing user data within the limits set out by its privacy policy and data retention guidelines. For documentation on this system, see wikitech:Event Platform.
Installation
- Baixe e mova a pasta extraída
EventLoggingao seu diretórioextensions/.
Desenvolvedores e colaboradores de código, por outro lado, deverão instalar a extensão a partir do Git, usando:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/EventLogging
- Adicione o seguinte código ao final do seu arquivo LocalSettings.php:
wfLoadExtension( 'EventLogging' ); $wgEventLoggingBaseUri = '/beacon/event'; $wgEventLoggingServiceUri = '/beacon/intake-analytics'; $wgEventLoggingStreamNames = false;
Concluído – Navegue à página Special:Version em sua wiki para verificar se a instalação da extensão foi bem sucedida.
Instalação com o Vagrant:
- Se estiver usando o Vagrant, instale com
vagrant roles enable eventlogging --provision
Configuring the schema location
By default, the extension will look for schemas on Meta-Wiki. The relevant default settings are:
# (default) $wgEventLoggingSchemaApiUri = 'https://meta.wikimedia.org/w/api.php';
# (default) $wgEventLoggingDBname = 'metawiki';
To use local schemas, or schemas from the central wiki of your own wikifarm, you need to override these.
E.g. to use the Schema namespace of the local wiki, set
$wgEventLoggingSchemaApiUri = $wgServer . '/w/api.php';
$wgEventLoggingDBname = $wgDBname;
(and ensure the user account that will create the schemas is autoconfirmed).
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
Developing the EventLogging extension
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 eventlogging role.
To enable it, run:
$ vagrant roles enable eventlogging
$ vagrant provision
For JavaScript development
If working on the JavaScript client, you'll need to install dependencies with npm install from the folder you're developing in.
Then you can use npm test to run ESLint for example.
The "How to run tests" section below points out how to see JavaScript test results.
Ao adicionar o parâmetro trackdebug=true à URL, o console nos devtools do navegador mostrará o registro de eventos sendo acionado.
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, then:
$ vagrant ssh
vagrant@mediawiki-vagrant:/vagrant/mediawiki$ composer phpunit:entrypoint -- extensions/EventLogging/testsEventLoggingExtensionFunctionsTest.php
| Esta extensão está sendo usada(o) por um ou mais projetos da Wikimedia. Isto significa que, provavelmente, a extensão é estável e funciona bem o suficiente para ser utilizada(o) em sites da web de alto tráfego. Procure pelo nome dessa extensão nos arquivos de configuração CommonSettings.php e InitialiseSettings.php da Wikimedia para verificar onde ela foi instalada. Uma lista completa das extensões instaladas numa wiki em particular podem ser visualizadas na página Special:Version da wiki. |
| Esta extensão está incluída nas seguintes fazendas/hospedagens (farms/hosts) e/ou pacotes wiki: Esta não é uma lista autoritativa (oficial). Algumas fazendas/hospedagens (farms/hosts) e/ou pacotes wiki podem conter esta extensão mesmo que não estejam listados aqui. Sempre verifique com suas fazendas/hospedagens (farms/hosts) ou pacotes wiki para confirmar. |
- Stable extensions/pt-br
- Special page extensions/pt-br
- Database extensions/pt-br
- ContentHandler extensions/pt-br
- GPL licensed extensions/pt-br
- Extensions in Wikimedia version control/pt-br
- ApiMain::moduleManager extensions/pt-br
- BeforePageDisplay extensions/pt-br
- CanonicalNamespaces extensions/pt-br
- CodeEditorGetPageLanguage extensions/pt-br
- EditFilterMergedContent extensions/pt-br
- GetPreferences extensions/pt-br
- MovePageIsValidMove extensions/pt-br
- All extensions/pt-br
- Extensions used on Wikimedia/pt-br
- Extensions included in Canasta/pt-br
- Extensions included in Miraheze/pt-br
- Extensions included in WikiForge/pt-br
- Analytics extensions/pt-br
- Statistics extensions/pt-br
