How do I apply a Matomo segment in Looker Studio?
When using the Matomo Connector for Looker Studio, there are multiple ways to apply a segment.
Configure reports to use a default segment
If the report is focused on a specific segment, you can choose the default segment at the time of connection.
-
To apply a segment to your imported report, select the segment from the drop down menu (1) when configuring the Matomo connector parameters.
-
Leave the checkbox Allow Segment to be modified in reports (2) unticked.
-
Complete the parameter fields and click Connect to apply the configuration.
Configure reports to use a dynamic segment selector
You can select and dynamically switch between segments from within Looker Studio’s report editor to view and analyse different sets of data. This lets you easily gain insights into specific audience segments without having to recreate or duplicate reports.
-
When configuring the Matomo connection, you can select to import standard or custom reports. For every imported report, you will need to add a data source.
-
Select a segment from the drop down menu (1).
-
Tick the checkbox Allow Segment to be modified in reports (2) to enable the option.
-
Complete the parameters form and click Connect to apply the configuration.
-
In Looker Studio, use the data fields and parameters from the imported reports (1) to design your report dashboard (2).
-
Add the segment to the report (the segment definition is based on the segments created in the Matomo data source).
a. Drag-and-drop the Segment field from the Data panel onto the report canvas; or
b. Click Insert > Drop-down list and select the Segment field as the control field. -
In the report’s edit and view mode, use the new Segment drop-down list to filter the data by audience segment.
The Segment selection applies to all reports added to the dashboard. When the segment changes, the data is adjusted to provide insights specific to the selected segment.
Configure individual charts to use a selected segment
With the Matomo connection parameter enabled for Allow Segment to be modified in reports, you can define a segment for each chart added to the report.
-
In Looker Studio edit mode, click on a chart to load the chart’s Set-up properties panel.
-
In the panel, scroll down to the Parameters section (1) and choose a segment from the drop-down list. This defines which segment’s data is included for the selected chart.
If the Segment drop-down is not visible in the Set-up properties panel, you may need to edit the connection settings for the Matomo data source or reconnect with updated settings.