Heatmap Plugin Loads Across All Tenants – Issues with Unused Containers

Hi everyone,

We’re using Matomo in a multi-tenant setup and recently purchased the Heatmap plugin for one of our containers (a public-facing website). The heatmaps work as expected in that specific container.

However, we’ve noticed that the plugin is installed tenant-wide and gets loaded in all containers – even in those where we don’t intend to use it. While no heatmaps are generated in these containers due to missing configuration, the plugin is still technically loaded when the container is initialized.

This causes issues in (internal) applications where these containers are embedded. Specifically, the additional resources or scripts loaded by the plugin seem to negatively impact performance or functionality.

Questions:

  1. Is there a way to activate the Heatmap plugin selectively for specific containers or pages?

  2. Can we prevent the plugin from loading in containers where it’s not used, without uninstalling it entirely?

  3. Are there any best practices for using the plugin in multi-tenant environments?

Thanks in advance for your support!

Best regards

If anyone is coming across this topic, this is how we fixed it. :wink:

By default, Matomo automatically initializes the Heatmap & Session Recording plugin whenever the tracking script runs. If you want more control — for example, to avoid unnecessary network requests or to disable heatmaps on certain environments — you can switch to manual initialization.

To enable heatmaps only when you actually need them, add this line to your tracking code:

_paq.push(['HeatmapSessionRecording::enable']);

If you do not include this command, the Heatmap/Session Recording plugin stays inactive, even if it is installed.

Benefits of using manual initialization:

  • Prevents unnecessary requests to configs.php

  • Reduces performance overhead

  • Ensures heatmaps/recordings run only on selected environments

  • Improves privacy control