AI-Powered Report Insights

Get instant AI-generated insights for any Matomo report. The plugin adds an "Insights" button to all report widgets that analyzes your data and provides actionable recommendations.

  • Works with all report types (visitors, actions, referrers, goals, custom dimensions, custom reports, etc.)
  • Supports data tables, evolution graphs, and series visualizations
  • Conversation mode: ask follow-up questions about your report data

Dedicated AI Chat

A full-featured chat interface for asking questions about your analytics data.

  • Accessible from the main menu under "MistralAI"
  • Real-time streaming responses (with automatic fallback for unsupported servers)
  • Errors returned by the model API are displayed as a notice directly in the chat, so misconfiguration is easy to spot

Flexible Model Configuration

Choose from preset models or specify custom model names.

Preset Models (curated for chat — code-completion, audio and vision-only specialists are excluded): - Mistral Large 3 - Mistral Medium 3.5 (default) - Mistral Small 4 - Magistral Medium 1.2 (reasoning) - Ministral 8B - Ministral 3B - Open Mistral Nemo (legacy multilingual)

Custom Models: Specify any model name to use models not in the preset list, perfect for: - Newer Mistral releases not yet in the preset - Code/audio/vision specialists (Codestral, Devstral, Voxtral, Pixtral, …) - Self-hosted LLMs (Mistral, LLaMA, etc.) - Other OpenAI-compatible providers

Multi-Site Configuration

Configure different AI settings per website using Measurable Settings: - Override system-wide host, API key, and model per site - Customize prompts for specific websites - Leave empty to use system defaults

Custom Host Support

Connect to any OpenAI-compatible chat completions endpoint: - Mistral AI (default) - Self-hosted Mistral models (vLLM, Ollama, LocalAI, etc.) - Other OpenAI-compatible providers

Note: API key is optional when using custom hosts, making it easy to connect to local LLM instances.

Customizable Prompts

Tailor the AI's behavior with custom prompts: - Chat Base Prompt: Customize how the AI responds in conversations - Insight Base Prompt: Customize how the AI analyzes report data

Safe and Theme-Aware

  • AI answers are sanitized before being displayed in Matomo
  • The chat and insight components follow Matomo's light and dark themes

Multi-Language Support

Full translations available in: - English - German (Deutsch) - Spanish (Español) - French (Français) - Italian (Italiano) - Dutch (Nederlands) - Swedish (Svenska)


  • A Mistral AI logo

  • General Settings

  • Get information from chat

  • Insights from your reports in one click

  • Simple click AI insight

Integrate AI-powered analytics insights and chat functionality into your Matomo instance using Mistral AI or any OpenAI-compatible API.

Features

AI-Powered Report Insights

Get instant AI-generated insights for any Matomo report. The plugin adds an "Insights" button to all report widgets that analyzes your data and provides actionable recommendations.

  • Works with all report types (visitors, actions, referrers, goals, custom dimensions, custom reports, etc.)
  • Supports data tables, evolution graphs, and series visualizations
  • Conversation mode: ask follow-up questions about your report data

Dedicated AI Chat

A full-featured chat interface for asking questions about your analytics data.

  • Accessible from the main menu under "MistralAI"
  • Real-time streaming responses (with automatic fallback for unsupported servers)
  • Errors returned by the model API are displayed as a notice directly in the chat, so misconfiguration is easy to spot

Flexible Model Configuration

Choose from preset models or specify custom model names:

Preset Models (curated for chat — code-completion, audio and vision-only specialists are excluded): - Mistral Large 3 - Mistral Medium 3.5 (default) - Mistral Small 4 - Magistral Medium 1.2 (reasoning) - Ministral 8B - Ministral 3B - Open Mistral Nemo (legacy multilingual)

Custom Models: Specify any model name to use models not in the preset list, perfect for newer Mistral releases, code/audio/vision specialists (Codestral, Devstral, Voxtral, Pixtral, …), self-hosted LLMs, or other OpenAI-compatible providers. If a custom model is rejected by the configured endpoint, the upstream error message will be shown in the chat.

Custom Host Support

Connect to any OpenAI-compatible chat completions endpoint: - Mistral AI (default) - Self-hosted Mistral models (vLLM, Ollama, LocalAI, etc.) - Other OpenAI-compatible providers

Dark Theme Support

The chat and insight components use Matomo's native CSS theme variables, so the UI automatically follows your Matomo theme — both light and dark — without any additional configuration.

Safe Answers

AI answers are sanitized before being displayed, so content coming from your reports (page titles, referrers...) cannot inject scripts or unsafe links in Matomo.

Installation

From Marketplace

  1. Go to the Administration panel as a super user
  2. Navigate to the Marketplace section and select "Plugins"
  3. Search for "MistralAI"
  4. Install and activate the plugin

Manual Installation

  1. Download the plugin from GitHub
  2. Extract to your /plugins folder
  3. Activate the plugin in Matomo's Plugin settings

Configuration

System Settings (Global)

Navigate to Administration > General Settings > MistralAI to configure:

Setting Description Host API endpoint URL. Default: https://api.mistral.ai/v1/chat/completions API Key Your Mistral AI API key (required for Mistral AI, optional for custom hosts) Model (Preset) Select from available model presets Model (Custom) Override preset with a custom model name Chat Base Prompt System prompt for chat conversations Insight Base Prompt System prompt for report insights

Measurable Settings (Per-Site)

All system settings can be overridden per website in the site's Measurable Settings. Leave fields empty to use system defaults.

This is useful for: - Using different models for different sites - Customizing prompts for specific website contexts - Using separate API keys per site

Usage

Getting Report Insights

  1. Navigate to any report in Matomo
  2. Click the "Insights" button (Mistral icon) in the report header
  3. View AI-generated insights in the side panel
  4. Ask follow-up questions to dive deeper into the data

Using the Chat

  1. Go to MistralAI in the main menu
  2. Type your question about analytics
  3. Receive AI-powered responses with streaming support
  4. Continue the conversation with follow-up questions

API Reference

The plugin provides the following API methods:

Method Description MistralAI.getResponse Get AI response for messages (non-streaming) MistralAI.getStreamingResponse Get AI response with SSE streaming MistralAI.getInsights Get AI insights for report data

Parameters

MistralAI.getResponse - idSite - Site ID - period - Period (day, week, month, year) - date - Date string - messages - Conversation messages in chat completions format

MistralAI.getInsights - idSite - Site ID - period - Period - date - Date string - widgetParams - Parameters of the report widget (module, action, idGoal, segment...) - messages - Conversation messages

All API methods require appropriate view permissions for the requested site.

Multi-Language Support

The plugin interface is available in: - English - German (Deutsch) - Spanish (Español) - French (Français) - Italian (Italiano) - Dutch (Nederlands) - Swedish (Svenska)

Requirements

  • Matomo 6.0.0 or higher
  • PHP 8.1 or higher
  • Valid API key (for Mistral AI) or accessible custom host

Support

How do I install this plugin?

This plugin is available in the official Matomo Marketplace:

  1. Go to the Administration panel
  2. Navigate to the Marketplace section and select "Plugins"
  3. Search for "MistralAI"
  4. Install and activate the plugin
  5. Configure your API settings in Administration > General Settings > MistralAI

Alternatively, download the plugin from GitHub and extract it to your /plugins folder.

What do I need to make it work?

You need a Mistral AI API key, which you can create in the Mistral AI console at https://console.mistral.ai/. If you're using a custom host (like a self-hosted LLM), an API key may be optional.

Can I use models other than Mistral AI's?

Yes! The plugin supports any OpenAI-compatible chat completions endpoint. You can connect to:

  • Self-hosted Mistral models (vLLM, Ollama, LocalAI)
  • Other OpenAI-compatible providers

Simply configure the custom host URL in the plugin settings.

Which models are supported?

The plugin includes presets curated for back-and-forth chat:

  • Mistral Large 3 (mistral-large-latest)
  • Mistral Medium 3.5 (mistral-medium-latest) — default
  • Mistral Small 4 (mistral-small-latest)
  • Magistral Medium 1.2 (magistral-medium-latest) — reasoning
  • Ministral 8B (ministral-8b-latest)
  • Ministral 3B (ministral-3b-latest)
  • Open Mistral Nemo (open-mistral-nemo) — legacy multilingual

You can also specify any custom model name for models not in the preset list.

Why aren't Codestral, Devstral, Voxtral or Pixtral in the list?

Code-completion specialists (Codestral, Devstral), audio (Voxtral) and vision-only models (Pixtral) were intentionally left out of the dropdown because they are tuned for one-shot tasks rather than conversation. You can still use them — or any other model — through the Model (Custom) field.

What happens if my model name is wrong or the API returns an error?

The plugin surfaces upstream API errors as a danger notice directly inside the chat (for both streaming and non-streaming requests). You'll see the actual error message returned by Mistral AI (or your custom host) — for example, an invalid model name, quota issue, or authentication problem — instead of a silent failure.

Does the plugin support dark mode?

Yes. The chat and insight components are styled with Matomo's native CSS theme variables (--theme-color-background-contrast, --theme-color-border, etc.), so they automatically follow whichever Matomo theme is active — light or dark — with no extra configuration.

Are the AI answers safe to display?

Yes. The answers are converted from Markdown and sanitized before being displayed: scripts, event handlers and unsafe links are removed, even when the answer is built from report data such as page titles or referrers.

Is the plugin available to all users in my Matomo instance?

Yes, once activated, all users with view permissions can access the AI features for their permitted sites.

Can I configure different settings per website?

Yes! Use Measurable Settings to override the system-wide host, API key, model, and prompts for specific websites. Leave fields empty to use system defaults.

How do I get insights for a report?

  1. Navigate to any report in Matomo
  2. Click the "Insights" button (Mistral icon) in the report header
  3. View AI-generated insights in the side panel
  4. Ask follow-up questions to dive deeper into the data

Does the plugin support streaming responses?

Yes, real-time streaming responses are supported. The plugin automatically falls back to non-streaming mode if your server doesn't support Server-Sent Events (SSE) or closes the stream without content.

Can I customize the AI's behavior?

Yes, you can customize:

  • Chat Base Prompt: Controls how the AI responds in chat conversations
  • Insight Base Prompt: Controls how the AI analyzes report data

These can be set globally or per website.

What languages are supported?

The plugin interface is translated into:

  • English
  • German (Deutsch)
  • Spanish (Español)
  • French (Français)
  • Italian (Italiano)
  • Dutch (Nederlands)
  • Swedish (Svenska)

What are the requirements?

  • Matomo 6.0.0 or higher
  • PHP 8.1 or higher
  • Valid API key (for Mistral AI) or accessible custom host

Is my data sent to Mistral AI?

When you use the Insights feature or Chat, the relevant report data and your messages are sent to the configured API endpoint (Mistral AI by default). If you have data privacy concerns, consider using a self-hosted LLM solution.

How can I contribute to this plugin?

You can contribute by:

  • Reporting issues on GitHub
  • Forking the project and submitting pull requests
  • Contacting the developer at ronan@openmost.com

How long will this plugin be maintained?

The plugin is actively maintained. The developer uses Matomo on many projects and will continue to patch and improve the plugin.

View and download this plugin for a specific Matomo version:


Please share