When you run Matomo on multiple servers, you will need the following setup:

  1. Download the plugin from the Marketplace (or from https://plugins.matomo.org/download using your License key)
  2. Extract the plugin in the Matomo plugins/ folder in your Matomo app codebase
  3. Deploy the same Matomo app codebase to all servers
  4. Make sure the config/config.ini.php file will be synchronised (or synchronise it manually) to all your Matomo app servers

To activate a new plugin, follow these steps:

  1. On one application server, run: php console plugin:activate TheNewPluginName. It will apply any database schema changes and writes to the config.ini.php (by adding to PluginsInstalled[] and Plugins[]).
  2. Sync config/config.ini.php to all servers (if not shared).
  3. Run the activation command on the other app servers as well: php console plugin:activate TheNewPluginName. This rebuilds node-local tracker assets (for example, updates to matomo.js) and it does not reapply schema changes.

Matomo bundles core tracker code plus any plugin tracker code (e.g., a plugin’s tracker.js/tracker.min.js) into a single matomo.js on the server that runs the activation. This is why you need to activate the plugin on every application server (or use a shared assets cache), so each node refreshes its local tracker bundle.

Previous FAQ: How do I install a new Theme?