Create your own calculated metrics

Analytics new Available from version 14.0.0

Needed permissions: owner, manage, edit & publish or edit

In Piwik PRO, you can use many valuable metrics for analyzing your website’s traffic and visitor behavior. But sometimes, you miss this one-of-a-kind metric that is typical only for your business. In such case, you can make your own calculations and create a new metric.

To create a calculated metric, follow these steps:

  1. Go to Menu > Analytics (new).
  2. Navigate to Settings.
  3. On the left, click Calculated metrics.
  4. Click Add new calculated metric.
  5. Calculated metrics in Piwik PRO.
  6. You can also skip steps 1-4. In a custom report, click Create new calculated metric.
  7. Setting up calculated metrics in Piwik PRO.
  8. Name the calculated metric and add a description.
  9. Setting up calculated metrics in Piwik PRO.

    Tip: The added description appears on the metric’s tooltip.

  10. Choose the Visibility option: Author or All users. The All users option lets you share this calculated metric with other teammates.
  11. Setting up calculated metrics in Piwik PRO.
  12. If you want to have this calculated metric available on all websites, mark All websites.
  13. Setting up calculated metrics in Piwik PRO.
  14. Add a formula for your calculated metric using existing metrics from the list. You can use the following operators: +, -, /, *.
  15. Setting up calculated metrics in Piwik PRO.
  16. On the list, you’ll also find dimensions that can be transferred into metrics. Click a dimension to view available metrics.
  17. Setting up calculated metrics in Piwik PRO.
  18.  When your formula is ready, click Validate to check if the new metric is calculated correctly.
  19. Setting up calculated metrics in Piwik PRO.
  20. In Formatting, pick a formatting type for the new metric. For example, Percentage.
  21. Setting up calculated metrics in Piwik PRO.
  22. Optionally, in Display settings, decide to show or hide percentage of total in reports.
  23. Setting up calculated metrics in Piwik PRO.
  24. When you’re done, click Create.
  25. Your new metric will appear on the list.

Use a calculated metric in custom reports and dashboards

After creating a calculated metric, you’ll be able to use it in custom reports and dashboards. You won’t find them in the core reports since they have default metrics. But you can always customize a core report, and then use calculated metrics.

To use calculated metrics in custom reports, follow these steps:

  1. Go to Menu > Analytics (new).
  2. Navigate to Custom reports.
  3. Click Add new report.
  4. Pick the report type.
  5. Name the report.
  6. On the right, click Metrics > Calculated metrics.
  7. Calculated metrics in custom reports in Piwik PRO.
  8. Build your new report using calculated metrics and other dimensions and metrics.
  9. When you’re done, click Create report.

To use calculated metrics in dashboards, follow these steps:

  1. Go to Menu > Analytics (new).
  2. Navigate to Dashboards.
  3. Click Add new dashboard.
  4. Add a name and set Visibility.
  5. Click Add widget and pick the widget type.
  6. On the right, click Metrics > Calculated metrics.
  7. Calculated metrics in dashboards in Piwik PRO.
  8. Build the widget using calculated metrics and other dimensions and metrics.
  9. When you’re done, click Create widget.
  10. Add other widgets to your dashboard.
A dashboard with calculated metrics in Piwik PRO.

Edit, copy or delete a calculated metric

To edit, copy or delete a calculated metric, follow these steps:

  1. Go to Menu > Analytics (new).
  2. Navigate to Settings.
  3. On the left, click Calculated metrics.
  4. Pick the metric you want to work with.
  5. On the right, click a three-dot icon.
  6. Click Edit calculated metric, Copy calculated metric or Delete calculated metric.

Calculated metric examples

Calculated metrics give you the freedom to create a metric that better describes traffic on your website. But before you feel comfortable using it, you may need some inspiration. Therefore, here’s a list of examples that may come in handy in your web reporting.

Pages per visitor: Similar to the default metric: Page views in session. It shows you the average number of pages a visitor viewed on your site. 

Name: Pages / visitors
Formatting: Number
Formula: {page_views} / {visitors}

Sessions per visitor: It illustrates the average number of sessions a visitor had on your website.

Name: Sessions / visitors
Formatting: Number
Formula: {sessions} / {visitors} 

Visitor conversion rate: It gives you a better view on the website’s conversion rate based on visitors (instead of sessions) 

Name: Visitor conversion rate
Formatting: Percentage
Formula: {goal_conversions} / {visitors}
 
Visitor ecommerce conversion rate: Focuses on ecommerce conversions based on visitors (not sessions).

Name: Visitor ecommerce conversion rate
Formatting: Percentage.
Formula: {ecommerce_conversions} / {visitors}

Total visitor conversion rate: It combines goal and ecommerce conversions to show an overall conversion rate based on visitors.

Name: Total visitor conversion rate
Formatting: Percentage
Formula: ({goal_conversions} + {ecommerce_conversions}) / {visitors}

No-bounces: The opposite of the default metric: Bounces. It helps you focus on traffic that didn’t bounce after the first-page view.

Name: No-bounces
Formatting: Number
Formula: {sessions} – {bounces}

No-bounce rate: It shows you the percentage of sessions that included more than one-page view.

Name: No-bounces
Formatting: Percentage
Formula: ({sessions} – {bounces}) / {sessions}

Was this article helpful?

Technical Support

If you have any questions, drop us a line at support_SPC@piwik_SPC.pro.

We’re happy to help!