skills-templates/matomo-api/SKILL.md
Matomo (Piwik) analytics platform API. Use for web analytics, tracking implementation, reporting API integration, plugin development, PHP/JavaScript tracking clients, and database schema understanding.
npx skillsauth add enuno/claude-command-and-control matomo-apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive API reference for Matomo (formerly Piwik), the open-source web analytics platform. Covers tracking APIs, reporting APIs, JavaScript/PHP clients, and database schema.
This skill should be triggered when:
https://your-matomo-domain.example/matomo.php
Required Parameters:
idsite - Website ID being trackedrec=1 - Required to enable trackingCommon 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 versione_c - Event categorye_a - Event actione_n - Event namee_v - Event value (numeric)idgoal - Goal ID to trigger conversionrevenue - Monetary value for conversionec_id - Order IDec_items - JSON array of itemsrevenue - Total order valueec_st - Subtotalec_tx - Taxec_sh - Shippingec_dt - Discounthttps://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)// 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]);
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);
// 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']);
This skill includes comprehensive documentation in references/:
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"
}
?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
# Visits from mobile devices in United States
&segment=deviceType==smartphone;countryCode==us
# Visits with specific event
&segment=eventCategory==Video;eventAction==Play
$tracker->enableBulkTracking();
$tracker->doTrackPageView('Page 1');
$tracker->doTrackPageView('Page 2');
$tracker->doTrackEvent('Category', 'Action');
$tracker->doBulkTrack(); // Send all at once
VisitsSummary - Overall visit metricsUserCountry - Geographic dataDevicesDetection - Device and browser infoUserLanguage - Language preferencesActions - Pages, downloads, outlinksEvents - Custom event trackingContents - Content impression trackingGoals - Goal conversions and revenueEcommerce - Ecommerce transactionsReferrers - Traffic source analysisMarketingCampaignsReporting - Campaign trackingLive - Real-time visitor dataLive.getLastVisitsDetails - Recent visitor details| Metric | Description |
|--------|-------------|
| nb_uniq_visitors | Unique visitors |
| nb_visits | Total visits (30-min session) |
| nb_actions | Page views, downloads, outlinks |
| bounce_rate | Single-page visit percentage |
| avg_time_on_page | Average page duration |
| revenue | Goal/ecommerce revenue |
| conversion_rate | Goal achievement ratio |
log_visit - Individual visitslog_link_visit_action - Actions within visitslog_action - Action definitions (URLs, titles)log_conversion - Goal conversionslog_conversion_item - Ecommerce itemsarchive_numeric_YYYY_MM - Numeric metricsarchive_blob_YYYY_MM - Report data (compressed)site - Website configurationgoal - Goal definitionssegment - Saved segmentsuser - User accountsaccess - User permissions&token_auth=YOUR_TOKEN_HERE
cip)cdt)country, region, city, lat, long)filter_limit to restrict row countsrec=1 parametertools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.