ceytek-labs/matomo-services-lite 问题修复 & 功能扩展

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

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

ceytek-labs/matomo-services-lite

Composer 安装命令:

composer require ceytek-labs/matomo-services-lite

包简介

Matomo Services Lite is a lightweight and extendable library designed to help you manage data easily using the Matomo in your PHP projects.

README 文档

README

Matomo Services Lite

Total Downloads Latest Version Size License

Matomo Services Lite - Matomo API for PHP

Matomo Services Lite is a lightweight and extendable library designed to help you manage data easily using the Matomo in your PHP projects.

Disclaimer: This package is not an official product of Matomo. The developers accept no responsibility for any issues, discrepancies, or damages that may arise from its use.

Requirements

  • PHP 7.0 or higher (including PHP 8)

Installation

You can add this package to your projects via Composer:

composer require ceytek-labs/matomo-services-lite

Services

Actions

The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles, Events, Content Tracking, File Downloads and Clicks on external websites.

Example Usage

The following example demonstrates how to manage data in a Actions document:

⬆ Back to services

Actions: Get

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->actions()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->get();

echo '<pre>'; print_r($result);

⬆ Back to services

Actions: Get Page Urls

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->actions()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->getPageUrls();

echo '<pre>'; print_r($result);

⬆ Back to services

Devices Detection

The DevicesDetection API lets you access reports on your visitors devices, brands, models, Operating system, Browsers.

Example Usage

The following example demonstrates how to manage data in a Devices Detection document:

⬆ Back to services

Devices Detection: Get Type

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->devicesDetection()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->getType();

echo '<pre>'; print_r($result);

⬆ Back to services

Events

The Events API lets you request reports about your users' Custom Events.

Example Usage

The following example demonstrates how to manage data in a Devices Detection document:

⬆ Back to services

Events: Get Action

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->events()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->getAction();

echo '<pre>'; print_r($result);

⬆ Back to services

Events: Get Category

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->events()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->getCategory();

echo '<pre>'; print_r($result);

⬆ Back to services

Events: Get Name

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->events()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->getName();

echo '<pre>'; print_r($result);

⬆ Back to services

Events: Get Name From Action ID

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->events()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->setIdSubtable('<your-id-subtable>')
    ->getNameFromActionId();

echo '<pre>'; print_r($result);

⬆ Back to services

Marketing Campaigns Reporting

API for plugin MarketingCampaignsReporting

Example Usage

The following example demonstrates how to manage data in a Marketing Campaigns Reporting document:

⬆ Back to services

Marketing Campaigns Reporting: Get Name

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->marketingCampaignsReporting()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->getName();

echo '<pre>'; print_r($result);

⬆ Back to services

Sites Manager

The SitesManager API gives you full control on Websites in Matomo (create, update and delete), and many methods to retrieve websites based on various attributes.

Example Usage

The following example demonstrates how to manage data in a Sites Manager document:

⬆ Back to services

Sites Manager: Get All Sites

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->sitesManager()
    ->getAllSites();

echo '<pre>'; print_r($result);

⬆ Back to services

Users Manager

The UsersManager API lets you Manage Users and their permissions to access specific websites.

Example Usage

The following example demonstrates how to manage data in a Users Manager document:

⬆ Back to services

Users Manager: Get Users With Site Access

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->usersManager()
    ->setIdSite('<your-id-site>')
    ->setAccess('<your-access>')
    ->getUsersWithSiteAccess();

echo '<pre>'; print_r($result);

⬆ Back to services

Visits Summary

VisitsSummary API lets you access the core web analytics metrics (visits, unique visitors, count of actions (page views & downloads & clicks on outlinks), time on site, bounces and converted visits).

Example Usage

The following example demonstrates how to manage data in a Visits Summary document:

⬆ Back to services

Visits Summary: Get

use CeytekLabs\MatomoServicesLite\Matomo;

$result = Matomo::make()
    ->setApi('<your-api-url>')
    ->setToken('<your-token>')
    ->visitsSummary()
    ->setIdSite('<your-id-site>')
    ->setPeriod('<your-period>')
    ->setDate('<your-date>')
    ->get();

echo '<pre>'; print_r($result);

Contributing

Feel free to submit a pull request or report an issue. Any contributions and feedback are highly appreciated!

License

This project is licensed under the MIT License.

ceytek-labs/matomo-services-lite 适用场景与选型建议

ceytek-labs/matomo-services-lite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 25 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 ceytek-labs/matomo-services-lite 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 25
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-06