Create your own calculated metrics

Analytics

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.
  2. Navigate to Settings.
  3. On the left, click Calculated metrics.
  4. Click Add a calculated metric.
    Calculated metrics in Piwik PRO
  5. You can also skip steps 1-4. In a custom report, click Create a calculated metric.
    Calculated metrics in Piwik PRO
  6. Name the calculated metric and add a description.
    Calculated metrics in Piwik PRO

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

  7. In Visibility, set: Author or All users. The All users option lets you share this calculated metric with other teammates.
    Calculated metrics in Piwik PRO
  8. If you want to have this calculated metric available on all websites, mark All websites.
    Calculated metrics in Piwik PRO
  9. Add a formula for your calculated metric using existing metrics from the list. You can use the following operators: +-/*.
    Calculated metrics in Piwik PRO
  10. On the list, you’ll also find dimensions that can be transferred into metrics. Click a dimension to view available metrics.
    Calculated metrics in Piwik PRO

    Note: Only the listed transformations are avaliable. It’s not possible yet to use your own transformations.

  11. When your formula is ready, click Validate to check if the new metric is calculated correctly.
    Calculated metrics in Piwik PRO
  12. In Formatting, pick a formatting type for the new metric. For example, Percentage.
    Calculated metrics in Piwik PRO
  13. Optionally, in Display settings, decide to show or hide percentage of total in reports.
    Calculated metrics in Piwik PRO
  14. When you’re done, click Create.
  15. 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.
  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.
    Calculated metrics in Piwik PRO
  7. Build your new report using calculated metrics and other dimensions and metrics.
  8. When you’re done, click Create report.

To use calculated metrics in dashboards, follow these steps:

  1. Go to Menu > Analytics.
  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.
    Calculated metrics in Piwik PRO
  7. Build the widget using calculated metrics and other dimensions and metrics.
  8. When you’re done, click Create widget.
  9. Add other widgets to your dashboard.
    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.
  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 metricCopy calculated metric or Delete calculated metric.
    Calculated metrics in Piwik PRO

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 still have some questions, visit our community.
There’s always someone ready to help!

Back to help center