Overview: Metric Builder for Matomo (Dimension Report)

HOW TO

How to access Custom Metrics and Metric Builder for Matomo (Dimension Report)

Navigate to Metrics > Custom Metrics to access the Metric Builder. Click the green + New Custom Metric button and select your connected Matomo Account from the Data Source drop-down list. Select the Dimension Report radio button.

Metric Builder is available on the Professional and higher plans. Request a trial of Metric Builder by following these steps.

How to use the Metric Builder for Matomo (Dimension Report)

A) Data Source: This is the Matomo Data Source that the Custom Metric is syncing data from.
B) Metric: Select a Metric from your connected Matomo Data Source, such as Visits, Total Searches or Clicks.  
C) Dimension (Optional): The Dimension parameter re-categorizes the returned Metric value based on common criteria. Examples of Dimensions are Country, Device Type, and Search Engine. If no Dimension is selected, the Custom Metric will store 1 aggregated Metric value for each Date Range. 

Pro Tip: Add the word "by" in between the Metric and Dimension in order to determine an appropriate Custom Metric Name. From the Metric and Dimension examples outlined above, we could create the Custom Metrics "Visits by Country," "Total Searches by Device Type," or "Clicks by Channel Type."

 
D) Favourable Trend: By default,  Trending up is positive is pre-selected, which will display the percentage change value on Datablocks as green when the Metric value has increased. If the Custom Metric you created has opposite trends, select  Trending down is positive radio button. Learn more here
E) Segments  (Optional): A segment is a subset of your Analytics data. For example, out of your entire set of Visitors tracked, one Segment might be Visitors from a particular Country. Another Segment might be Visitors who purchase a particular line of products, or Visitors who came to your website from an Organic Source. 
F) Actions  in (Optional): You can select which segment group you would like to use in the Actions in drop-down. These Segment(s) would restrict the data that gets included in the Custom Metric. All data that is returned is tested against the Segment(s). Multiple Segment(s) can be combined using AND /OR boolean logic. 
If the data synced from the Metric and Dimension fields meet the Segment's specifications, the data is retained and included in the Custom Metric value. If the data synced from the Metric and Dimension fields don't meet the Segment specifications, the data is excluded from the Custom Metric value.

Pro Tip : If you don't know which segments to put in place for your use case, use the Dimension + Data Preview to troubleshoot and get more insight into the data that is returned from your Matomo Account for each field. Learn more here.

 
G) Preview data: After clicking Preview data, a Data Preview of the Custom Metric will be displayed. Daily Metric values are displayed in this section, along with the total Metric values for the Date Range in bold at the bottom. You can view the Data Preview for different Date Ranges by clicking on the drop-down list at the top of the Data Preview. 
H) Custom Metric Name: Enter a name for your Custom Metric. This Custom Metric name will be available in the Designer after saving. 
I) Save: Save your Custom Metric. 

 

How to create a Custom Matomo Dimension Report Metric [Example]

In this example, we'll create a Custom Metric to report on Visits tracked in the Matomo Account, split up based on Country.

  1. Navigate to Metrics  > Custom Metrics
  2. Click the green + New Custom Metric button
  3. Select the appropriate Matomo Data Source
  4. Select the Dimension Report radio button.
  5. Select Visits from the  Metric drop-down list  
  6. Next, we'll select Country from the Dimension drop-down list so that the Visits values returned are split up based on Country.
  7. We don't need to further add Segments to the data, so we will leave the Segments section blank.
  8. In order to accurately explain what this Custom Metric is reporting on, we'll name the Custom Metric "Visits by Country"
  9. Click Preview data to generate a Data Preview of the Custom Metric. 
  10. Once we confirm that these are the results we're looking for, we'll click Save to save the Custom Metric. 

 

How to add a Custom Matomo Dimension Report Metric to a Databoard

Learn how to add a Custom Metric to a Databoard here.

 

Additional Information

  • The Data Preview is limited to display a maximum of 20 Dimensions per Date Range for Dimensional Metrics. Dimensions will be sorted by descending value, therefore the 20 Dimensions with the highest total values will be displayed in the Data Preview for each Date Range.
  • With this Metric Builder, we are able to pull data for Dimensional Metrics "Unique Visitors" via the API. However, this Metric is not able in Matomo UI which means that the values are not visible in your Matomo Account.