mediawiki/piwik-integration 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mediawiki/piwik-integration

最新稳定版本:v4.0.1

Composer 安装命令:

composer require mediawiki/piwik-integration

包简介

The Matomo (ex-Piwik) extension inserts your Matomo tracking code to the bottom of every page.

README 文档

README

Version 4.0.1

  • Last update: 28 February 2019

This the Mamoto (ex-Piwik) integration extension for MediaWiki software. The extension is only useful if you've got a MediaWiki installation; it can only be installed by the administrator of the site.

Minimum requirements

  1. MediaWiki 1.25+

  2. A Matomo (0.4+) installation with the site configured

Installation instructions

Please, read them carefully. They're not very difficult to understand, but ALL steps are necessary:

  1. Create a folder called "Matomo" in your extensions directory

  2. Upload extension.json and Matomo.hooks.php in the "Matomo" folder you've just created

  3. Edit your LocalSettings.php and, at the end of the file, add the following:

     wfLoadExtension( 'Matomo' );
    
  4. Configure the Matomo URL and site-id. To do so; edit the LocalSettings and set up the following variables:

    $wgMatomoURL = "matomo-host.tld/dir/";

    $wgMatomoIDSite = "matomo_idsite";

    IMPORTANT Do not define the protocol of the $wgMatomoURL

Note: Change the value of $wgMatomoURL with the URL, without the protocol but including the domain name, where you installed Matomo. Remember to add the trailing slash!

  1. Enjoy our extension!

Note: to check if the extension has succesfully installed; go to your wiki and check if the Matomo extension is present on the bottom of the Wiki source code.

Custom variables

  • Disable cookies by setting the $wgMatomoDisableCookies variable to false.

    For example: $wgMatomoDisableCookies = false;

  • Ignore regular editors: set $wgMatomoIgnoreEditors to true

  • Ignore Bots: set $wgMatomoIgnoreBots to true

  • Ignore sysop users: set $wgMatomoIgnoreSysops to true

  • To define custom javascript tags in the Matomo javascript code, its possible to define the $wgMatomoCustomJS variable. For example if you have a single setting to insert; use the following code:

    $wgMatomoCustomJS = "_paq.push(['trackGoal', '1']);"

    If you have multiple variables to define; use an array. For example:

    $wgMatomoCustomJS = array( "_paq.push(['setCustomVariable', '1','environment','production']);", "_paq.push(['setCustomVariable', '1','is_user','yes']);" );

  • If you want to change the title of your pages inside the Matomo tracker, you can set $wgMatomoActionName inside your LocalSettings.php file.

  • In case you want to include the title as, for example, "wiki/Title of the page", you can set $wgMatomoUsePageTitle to true and set $wgMatomoActionName to wiki/. The extension will print matomo_action_name = 'wiki/Title of the page';

  • If you want to track the username of the visitor with the Matomo feature User ID (needs Matomo >= 2.7.0) set the $wgMatomoTrackUsernames to true in LocalSettings.php.

mediawiki/piwik-integration 适用场景与选型建议

mediawiki/piwik-integration 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 35.61k 次下载、GitHub Stars 达 17, 最近一次更新时间为 2014 年 10 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「piwik」 「mediawiki」 「matomo」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 mediawiki/piwik-integration 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 mediawiki/piwik-integration 我们能提供哪些服务?
定制开发 / 二次开发

基于 mediawiki/piwik-integration 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 35.61k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 17
  • 点击次数: 20
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 17
  • Watchers: 4
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2014-10-31