BS Matomo Connector

Matomo, formerly Piwik, is a free and open source web analytics application developed by a team of international developers, that runs on a PHP/MySQL webserver. It tracks online visits to one or more websites and displays reports on these visits for analysis. Matomo’s full range of features in combination with the Contentserv Matomo Connector allows to evaluate the entire user-journey of everyone who uses Contentserv.

Integration in Contentserv

The Contentserv Matomo Connector is deployed as Business Solution compatible to CS17.0 and higher. It requires the modules

  • BSLive/modules/alani as platform
  • BSLive/modules/analytics to track analytics events
  • BSLive/modules/matomo to forward the tracked events to your Matomo server

The Matomo connector is licensed as all BS modules in the BS section of the settings.

Once activated here the BS Analytics and BS Matomo sections appear in the settings.

In the BS Analytics section the tracking of Analytics events can be triggered:

  • Usernames can be added here at "Ignored Usernames" that should not be tracked.
  • IP addresses that should not be tracked can be added at "Ingored IP Addresses"

This allows to make sure, that only relevant user scenarios are tracked.

Once the tracking is activated there are two event types automatically tracked:

  • defined HTML Page Impressions
  • defined REST Service Calls

The HTML Page Impressions automatically get the Matomo Tracking Codes embedded and connect to the Matomo server client to client.

The REST Service calls can not use embed codes, as this would change their output and destroy structures. These events are added to an event queue, which at the end stores them in a data base table.

For example is somebody searches in the Deep- or OpenSearch for "SLT" this will be recorded in the AnalyticsLog Database Table:

The events logged in this table then are processed by an Active Script "BS Analytics Log Queue". This ActiveScript is automatically created and activated when running the "Update Data Model" procedure.

The "BS Analytics Log Queue" then forwards the events to all registered Analytics Plugins and removes them from the table after all Analytics Plugins have processed the events. Currently the  Matomo Connector is available for production, a Google Analytics Connector is under development.

Configuring the Matomo Connector

The BS Matomo Analytics Connector is the first connector available now. Once the license is installed it can be configured at the "System Preferences / Settings / BS / Matomo Connector".

To use it a valid Matomo Installation is required with URL and API Server Token. Matomo itself is free and open source and can be downloaded at There is also a Matomo SaaS Platform available, which can be used for 30 days without any costs.

For testing purposes also the Contentserv Matomo Demo Environment can be used with the following access data:

To configure the settings first provide the Server URL and store the settings. Then in a second step provide the token and store again.

This is important, as the Server Token is stored internally per Server URL.

Once the connection is valid more settings appear:

  • Site Name - this is created by the CS environment by default
  • Site ID - this is created by the Matomo connector by default on the Matomo Server and registered here
  • Use custom Site Name - when this option is activated custom Site Name and ID can be provided
  • Disable Queued Tracking - this can be activated for testing purposes

To integrate the Matomo Dashboard there are two possibilities:

Integrate with the Matomo Site Dashboard Studio Application

This is a Contentserv Studio Plugin which integrates in the vertical Studio Portal Widget.

After saving and reloading the Contentserv portal the Matomo Dashboard will show up as button in the vertical studio toolbar:

Integration with the BS Matomo Portal Widget

Alternatively there is also a standalone portal widget available, what covers a complete portal tab:

When the tab is created and the portal locked and reloaded the Matomo Dashboard appears as stand alone tab.

Configuring the Matomo Dashboard

The Matomo Dashboard can be configured easily by adding Matomo Widgets using the "Dashboard" Dropdown.

Please refer to the Matomo documentation for further information about the Matomo Dashboard widgets.

Adding Custom Tracking Points

In the standard configuration the tracking events are configured and deployed by Contentserv using the files

  • BSLive/modules/analytics/conf/standard/URLs.Embed.txt for HTML views and
  • BSLive/modules/analytics/conf/standard/URLs.Events.txt for event tracking

It is possible to add custom embed pages by registering them in the file

  • BSLive/modules/analytics/conf/custom/URLs.Embed.txt for HTML

with the same syntax as in the standard file, for example with the line

Product View:forward=modules|pdm|gui|editProducts.php

The part before the colon (here "Product View" is later the tracking category within Matomo).

The part behind the colon is a part that has to appear in the URL that should be tracked.

In a nutshell

The following PDF gives an easy overview of the BS Matomo Connector. This PDF can be used by Salespersons, Business Users, Marketing, etc.

Click here to

Further support and information

If you have any questions contact us at