Extension:MatomoAnalytics
Appearance
Release status: stable |
|
|---|---|
| Implementation | Special page, User activity |
| Description | Integration with Matomo for analytics. Adds a special page to view that stats on-wiki. |
| Author(s) | John Lewis, Southparkfan, Universal Omega, Agent Isai |
| Maintainer(s) | Miraheze system administrators |
| Latest version | continuous updates |
| Compatibility policy | Main branch maintains backward compatibility. |
| MediaWiki | >= 1.43.0 |
| PHP | 7.2+ |
| Database changes | No, Yes if $wgMatomoAnalyticsUseDB is enabled |
| Composer | miraheze/matomo-analytics |
| Virtual domain | virtual-matomoanalytics |
|
|
|
|
| Licence | GNU General Public License 3.0 or later |
| Download | |
The MatomoAnalytics extension inserts tracking code for the Matomo analytics platform. It also creates a Special Page (Special:Analytics) where you can view the stats on-wiki.
For reporting an issue or a bug, please use Miraheze Phabricator. See here for the workboard.
Installation
- Download and place the file(s) in a directory called
MatomoAnalyticsin yourextensions/folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'MatomoAnalytics' );
- Configure as required.
Done – Navigate to Special:Versionon your wiki to verify that the extension is successfully installed.
Configuration
| parameter | default | comment | required? |
|---|---|---|---|
$wgMatomoAnalyticsServerURL
|
""
|
URL of your Matomo installation
It is important that the whole URL is used with protocol and trailing slash: |
Required |
$wgMatomoAnalyticsTokenAuth
|
""
|
The auth token for the API of your Matomo install | Required |
$wgMatomoAnalyticsSiteID
|
1
|
Matomo site ID | Optional |
$wgMatomoAnalyticsGlobalID
|
0
|
Shared Matomo site ID. For use on wikifarms. | Optional |
$wgMatomoAnalyticsUseDB
|
false
|
Whether to use a database or not. For use on wikifarms. | Optional |
$wgMatomoAnalyticsForceGetRequest
|
false
|
Whether or not you want to force GET requests which also disables beacon. Reverts back to Matomo v3 tracking behavior. | Optional |
$wgMatomoAnalyticsEnableCustomDimensionsUserType
|
false
|
Whether to fetch userType in Matomo using CustomDimensions. You must set up CustomDimensions to be able to use this.
|
Optional |
$wgMatomoAnalyticsDisableCookie
|
false
|
Allow disabling cookies set by Matomo. | Optional |
$wgMatomoAnalyticsDisableJS
|
false
|
Allow disabling of JS tracking code globally | Optional |
Matomo API token
To obtain a Matomo API token from your Matomo installation, you can follow the official documentation:
https://matomo.org/faq/general/faq_114/
See also
| This extension is included in the following wiki farms/hosts and/or packages: |
| This extension is maintained by Miraheze. Some Miraheze extensions are very Miraheze-specific and you may encounter issues you don't see on Miraheze. To report a bug or request a configuration change, please do so on the Miraheze Issue Tracker and not on Wikimedia Phabricator. |
Categories:
- Stable extensions/en
- Special page extensions/en
- User activity extensions/en
- Extensions supporting Composer/en
- CreateWikiCreation extensions/en
- CreateWikiDeletion extensions/en
- CreateWikiRename extensions/en
- InfoAction extensions/en
- LoadExtensionSchemaUpdates extensions/en
- SkinAfterBottomScripts extensions/en
- GPL licensed extensions/en
- Extensions in GitHub version control/en
- All extensions/en
- Extensions included in Miraheze/en
- Web Analytics extensions/en
- Statistics extensions/en
- Extensions by Miraheze/en
