定制 piwik/piwik-php-tracker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

piwik/piwik-php-tracker

最新稳定版本:3.4.0

Composer 安装命令:

composer require piwik/piwik-php-tracker

包简介

PHP Client for Matomo Analytics Tracking API

README 文档

README

The PHP Tracker Client provides all features of the Matomo Javascript Tracker, such as Ecommerce Tracking, Custom Variables, Event Tracking and more.

Documentation and examples

Check out our Matomo-PHP-Tracker developer documentation and Matomo Tracking API guide.

// Required variables
$matomoSiteId = 6;                  // Site ID
$matomoUrl = "https://example.tld"; // Your matomo URL
$matomoToken = "";                  // Your authentication token

// Optional variable
$matomoPageTitle = "";              // The title of the page

// Load object
require_once("MatomoTracker.php");

// Matomo object
$matomoTracker = new MatomoTracker((int)$matomoSiteId, $matomoUrl);

// Set authentication token
$matomoTracker->setTokenAuth($matomoToken);

// Track page view
$matomoTracker->doTrackPageView($matomoPageTitle);

Requirements:

  • JSON extension (json_decode, json_encode)
  • cURL or stream extension (to issue the HTTPS request to Matomo)

Installation

Composer

composer require matomo/matomo-php-tracker

Manually

Alternatively, you can download the files and require the Matomo tracker manually:

require_once("MatomoTracker.php");

License

Released under the BSD License

统计信息

  • 总下载量: 789.97k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 224
  • 点击次数: 2
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 219
  • Watchers: 23
  • Forks: 82
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2014-12-19