> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kameleoon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Matomo

> Send Kameleoon experiment data to Matomo via custom variables to flag heatmaps, recordings, and forms with campaign variation data for behavioral analysis.

Matomo offers data visualization tools, including heatmaps. For more information, you can consult [the documentation by Matomo on heatmaps](https://fr.matomo.org/docs/heatmaps/).

With the Matomo integration, you can flag heatmaps, recordings, forms, and more with the campaign name and variant seen by a visitor.

**Key benefits:**

* Filter each Matomo analytics tool (for example, heatmap, session recording) by campaign and variation names.
* Analyze visitor behavior when exposed to a campaign variant and identify new experiment or personalization opportunities.

## Activate Matomo

To use Matomo (formerly Piwik), you must activate it in the Kameleoon Integrations page. To do this:

1. Open the Kameleoon app.
2. Click **Admin** > **Integrations**.
3. Search for the Matomo integration and click it.
4. Click **Install**.
5. Select the project on which you want to activate Matomo.
6. Click **Next**.
7. Configure the integration:
   * **Default variable**: The variable Kameleoon uses when the integration is on by default.

![](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/integrations/as-a-destination/analytics/matomo/configuration.png)

8. Click **Next**.

You will then see it appear in the installed tab with the number of projects on which you've configured the tool.

Kameleoon will transmit your experiments' results to Matomo if you've installed the tool's script on your pages.

> [!NOTE]
>
> If you need to change the behavior of Kameleoon's native bridge, you can [create a custom analytics bridge](https://docs.kameleoon.com/user-manual/integrations/as-a-destination/analytics/custom-analytics-integration.md) and use the Matomo sample code on [Kameleoon's Github repository](https://github.com/Kameleoon/custom-analytics-integrations/tree/master/matomo).

## Associate Matomo with an experiment

### In the Graphic/Code editor

Once you activate Matomo in the Integrations page, you can select it as a reporting tool in the **Integrations** step of the finalization panel.

![](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/integrations/as-a-destination/analytics/matomo/Capture-decran-2023-11-20-a-15.36.20.png)

In the dropdown list, select the ID of the Matomo [custom variable](https://fr.matomo.org/docs/custom-variables/) (`customVar`) you wish to associate.

Kameleoon will automatically send the data to Matomo via this custom variable.

### On the Results page

Once you set Matomo as a reporting tool for an experiment, you can select or clear it via the Kameleoon Results page. To do this:

1. Click the **three-dots menu** next to the **Export** button.
2. Click **Experiment configuration** (**Open configuration** for personalization). [A side menu](https://docs.kameleoon.com/user-manual/experiment-analytics/analyze-results/results-page/results-page-actions.md#experiment-configuration) appears.

![](https://storage.googleapis.com/kameleoon-storage-documentation/user-manual/images/results-page-reporting-tools-kameleoon-only-personalization-2x-v4.png)

3. In the **Reporting tools** section, click **Edit**. The [Finalization page](https://docs.kameleoon.com/user-manual/experimentation/web-experimentation/configure-and-launch/finalizing-an-experiment.md#activate-an-integration-on-an-experiment) opens.
4. On the Finalization page, click **Integrations**.
5. Click **Activate** next to **Matomo**.
6. To save this step, click **Next**.

From the dropdown list, select the [custom variable's](https://fr.matomo.org/docs/custom-variables/) ID (`customVar`) you wish to associate.

Kameleoon will automatically send the data to Matomo using this custom variable. Kameleoon takes into account only the data retrieved after the tool's activation.

## Associate Matomo with a personalization

### On the personalization creation page

To select Matomo for a personalization, go to the **Integrations** tab in the finalization flow, and click **Activate** next to **Matomo**.

From the dropdown list, select the [custom variable's](https://fr.matomo.org/docs/custom-variables/) ID (`customVar`) you wish to associate.

Kameleoon will automatically send the data to Matomo through this custom variable.

## Associate Matomo with a feature flag

To add Matomo to a feature flag:

1. Click **Edit** on the feature flag you want to track.
2. Click **Integrations** in the **Reporting** section. All the integrations you've enabled appear.
3. Toggle **Matomo** on for **Delivery rules**, **Feature experiments**, or both.

[Learn how to manage third-party analytics integrations](https://docs.kameleoon.com/user-manual/experimentation/feature-experimentation/track-your-feature-experiments/managing-third-party-integrations.md)

## Segment your results in Matomo

To understand how to segment your results according to this custom variable, you can refer to [the Matomo documentation on the subject](https://matomo.org/docs/custom-variables/).
