# Matomo MCP

> Matomo provides deep web analytics tracking by connecting your Matomo instance directly to your AI agent. Instead of clicking through complicated dashboards, you ask natural language questions—like 'What was our bounce rate last month?' or 'Did the pricing page conversion increase?' Your AI client retrieves processed reports, tracks specific actions, and summarizes site performance instantly.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** web-analytics, visitor-tracking, conversion-optimization, data-visualization, privacy-focused

## Description

Your web analytics data moves beyond static graphs and manual exports. By connecting your Matomo instance through Vinkius's catalog, you give your agent direct access to every piece of visitor information. You can ask your AI client for a comprehensive summary of total visits or specific details about how users interacted with a form. It’s like having an expert data analyst sitting next to you who never needs coffee breaks. Instead of spending hours digging through complex dashboards, you simply ask the question—whether it's tracking a single event, getting metadata on available reports, or generating a full, human-readable summary for a specific time frame. Your agent handles the API calls and returns actionable data directly into your workflow.

## Tools

### get_image_graph
Generates a static PNG graph showing data for a specific site and time period.

### get_processed_report
Retrieves a full, human-readable report set containing both metadata and processed metrics.

### get_report_metadata
Lists every available API function and its associated metadata for your entire Matomo setup.

### track_bulk
Sends multiple tracking requests (like page views or events) to optimize data ingestion in bulk.

### track_action
Records a single page view, event, or e-commerce action on your site using the required site ID.

### get_visits_summary
Retrieves core summary metrics like total visits, unique visitors, and bounce counts.

### get_wp_processed_report
Gets a processed report specifically through the WordPress REST API endpoint.

## Prompt Examples

**Prompt:** 
```
Get the visits summary for site ID 1 for the last 30 days.
```

**Response:** 
```
I've retrieved the summary for site 1. In the last 30 days, you had 12,450 visits, 38,200 actions, and a bounce rate of 28.5%.
```

**Prompt:** 
```
Track a page view for 'Pricing Page' on site 2 with URL 'https://example.com/pricing'.
```

**Response:** 
```
The page view for 'Pricing Page' has been successfully tracked for site ID 2.
```

**Prompt:** 
```
Show me the processed report for site 5 for today.
```

**Response:** 
```
I've generated the processed report for site 5. Today's data shows 450 visits and 1,200 actions, with top referrers being Google and Direct entry.
```

## Capabilities

### Summarize site performance metrics
Retrieve key numbers like total visits, actions taken, and bounce counts in one request.

### Track specific user interactions
Log page views, custom events, or e-commerce purchases when a visitor performs an action on your site.

### Generate full historical reports
Pull complete, processed data sets that include metadata and detailed metrics for deep analysis.

### List available reporting functions
Discover every possible API report and function your Matomo instance supports without needing to consult documentation.

### Send multiple data points at once
Streamline tracking by sending several page views or events in a single batch request.

## Use Cases

### Investigating poor conversion rates
The Marketing Manager notices the checkout funnel stalled last month. They ask their agent, 'What was the bounce rate on the payment page?' The agent uses `get_visits_summary` and provides an immediate comparison to previous periods, pointing directly to a sudden spike in exits.

### Pre-launch tracking setup
The Developer needs to ensure their new pricing widget tracks correctly. They use the agent's ability to call `track_action` repeatedly with test URLs and events, confirming that every trigger fires exactly as expected before going live.

### Quarterly performance review
The Data Analyst needs a comprehensive overview of Q3. They prompt the agent to 'Generate the processed report for site 1 for the last quarter.' The agent uses `get_processed_report` and returns a clean, summarized data set ready for presentation.

### Understanding technical limitations
The Developer isn't sure what metrics are available. They ask the agent to list all report metadata. The agent uses `get_report_metadata` and provides a checklist of every possible API function they can build upon.

## Benefits

- Stop digging through tabs. Instead of exporting massive files to manually check conversion rates, you can ask your agent for a detailed processed report and get the answer immediately.
- Optimize tracking with `track_bulk`. If you need to simulate or log many events quickly, sending them in a batch request is faster than calling single-action tools repeatedly.
- Know exactly what data is available. Use `get_report_metadata` to explore all possible reports your Matomo instance supports before writing a single query.
- Get the high-level view without the clicks. The `get_visits_summary` tool gives you core metrics like bounce rates and total visits right away, perfect for quick status checks.
- Validate tracking instantly. Developers can use `track_action` to verify if a specific page view or custom event is firing correctly before deployment.

## How It Works

The bottom line is that you talk to it like talking to a person; your AI client handles all the complex database querying and report processing for you.

1. Subscribe to this MCP and provide your Matomo Instance URL along with an authentication token.
2. Select your preferred AI client, such as Cursor or Claude, and connect the agent via Vinkius.
3. Ask your agent a question using natural language, like 'What were our top referrers last week?' The agent executes the necessary tool calls to pull the data.

## Frequently Asked Questions

**How do I use Matomo MCP to get the total number of visits?**
Use the `get_visits_summary` tool. This single call retrieves core metrics, giving you immediate access to total visits, unique visitors, and bounce counts without complex querying.

**Can Matomo MCP track an event that happened on a specific page?**
Yes, use the `track_action` tool. You provide the required site ID and details about the event (like a page view or e-commerce action), logging it immediately for later analysis.

**What is the best way to check my full historical performance?**
The `get_processed_report` tool is designed for this. It returns a complete, human-readable data set that includes both metrics and metadata, giving you maximum depth.

**Does Matomo MCP support tracking multiple actions at once?**
Yes, the `track_bulk` tool is built for efficiency. It lets you send numerous tracking requests simultaneously, which is much faster than running individual calls.

**How do I check what kind of reports Matomo supports?**
You use `get_report_metadata`. This function lists all available API functions and their metadata, so you always know the full scope of your analytics data.