matomo-api
БесплатноБез исполняемых скриптовНе проверенMatomo (Piwik) analytics platform API. Use for web analytics, tracking implementation, reporting API integration, plugin development, PHP/JavaScript tracking…
от enuno★ 17 звёзд на GitHubОб этом скилле
Matomo API Skill
Comprehensive API reference for Matomo (formerly Piwik), the open-source web analytics platform. Covers tracking APIs, reporting APIs, JavaScript/PHP clients, and database schema.
When to Use This Skill
This skill should be triggered when:
- Implementing Matomo tracking on websites or applications
- Building integrations with Matomo's Reporting API
- Querying analytics data programmatically
- Setting up event tracking, goal conversions, or ecommerce tracking
- Working with Matomo's JavaScript or PHP tracking clients
- Understanding Matomo's database structure for custom queries
- Implementing consent management and privacy controls
- Debugging Matomo tracking issues
Quick Reference
Tracking HTTP API Endpoint
https://your-matomo-domain.example/matomo.php
Required Parameters:
idsite- Website ID being trackedrec=1- Required to enable tracking
Common Parameters:
action_name- Page title for pageviewsurl- Full URL of the current action_id- 16-character hexadecimal visitor IDrand- Random value to prevent cachingapiv=1- API version
Event Tracking Parameters
e_c- Event categorye_a- Event actione_n- Event namee_v- Event value (numeric)
Goal Conversion
idgoal- Goal ID to trigger conversionrevenue- Monetary value for conversion
Ecommerce Parameters
ec_id- Order IDec_items- JSON array of itemsrevenue- Total order valueec_st- Subtotalec_tx- Taxec_sh- Shippingec_dt- Discount
Reporting API Endpoint
https://your-matomo-domain.example/index.php?module=API&method=MODULE.METHOD&format=FORMAT
Standard Parameters:
| Parameter | Values | Purpose |
|---|---|---|
idSite |
Integer or comma-separated | Website ID(s) |
period |
day, week, month, year, range | Time period |
date |
YYYY-MM-DD or magic keywords | Specific date |
format |
xml, json, csv, tsv, html, rss | Output format |
token_auth |
Your API token | Authentication |
Date Magic Keywords:
today,yesterdaylastWeek,lastMonth,lastYearlastX(e.g.,last7)previousX(e.g.,previous30)
JavaScript Tracking
// Page view
_paq.push(['trackPageView', 'Custom Page Title']);
// Event
_paq.push(['trackEvent', 'Category', 'Action', 'Name', Value]);
// Goal conversion
_paq.push(['trackGoal', goalId, customRevenue]);
// Site search
_paq.push(['trackSiteSearch', 'keyword', 'category', resultsCount]);
// Ecommerce order
_paq.push(['trackEcommerceOrder', orderId, grandTotal, subTotal, tax, shipping, discount]);
PHP Tracking
use MatomoTracker;
$tracker = new MatomoTracker($idSite, 'https://matomo.example.com/');
$tracker->setTokenAuth($token);
$tracker->setUserId($userId);
$tracker->doTrackPageView('Page Title');
$tracker->doTrackEvent('Category', 'Action', 'Name', $value);
$tracker->doTrackGoal($idGoal, $revenue);
Consent Management (JavaScript)
// Require consent before tracking
_paq.push(['requireConsent']);
// When user gives consent
_paq.push(['setConsentGiven']);
// Cookie-specific consent
_paq.push(['requireCookieConsent']);
_paq.push(['rememberCookieConsentGiven', hoursToExpire]);
// Opt-out
_paq.push(['optUserOut']);
Reference Files
This skill includes comprehensive documentation in references/:
- tracking-http-api.md - HTTP Tracking API specification
- reporting-api.md - Reporting API methods and parameters
- javascript-client.md - JavaScript Tracking Client reference
- php-client.md - PHP Tracking Client reference
- database-schema.md - Database tables and relationships
Common Patterns
Bulk Tracking (HTTP)
POST https://matomo.example.com/matomo.php
{
"requests": [
"?idsite=1&rec=1&url=https://example.org/page1",
"?idsite=1&rec=1&url=https://example.org/page2"
],
"token_auth": "your_token_here"
}
Bulk API Requests (Reporting)
?module=API&method=API.getBulkRequest
&urls[0]=method%3DVisitsSummary.get%26idSite%3D1%26period%3Dday%26date%3Dtoday
&urls[1]=method%3DActions.getPageUrls%26idSite%3D1%26period%3Dday%26date%3Dtoday
Segmentation
# Visits from mobile devices in United States
&segment=deviceType==smartphone;countryCode==us
# Visits with specific event
&segment=eventCategory==Video;eventAction==Play
PHP Bulk Tracking
$tracker->enableBulkTracking();
$tracker->doTrackPageView('Page 1');
$tracker->doTrackPageView('Page 2');
$tracker->doTrackEvent('Category', 'Action');
$tracker->doBulkTrack(); // Send all at once
Key API Modules
Visitor Analytics
VisitsSummary- Overall visit metricsUserCountry- Geographic dataDevicesDetection- Device and browser infoUserLanguage- Language preferences
Actions & Content
Actions- Pages, downloads, outlinksEvents- Custom event trackingContents- Content im
Установить matomo-api в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл matomo-api?
Matomo (Piwik) analytics platform API. Use for web analytics, tracking implementation, reporting API integration, plugin development, PHP/JavaScript tracking clients, and database schema understanding.
Как установить скилл matomo-api?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл matomo-api запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic