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:
- Go to Menu > Analytics.
- Navigate to Settings.
- On the left, click Calculated metrics.
- Click Add a calculated metric.
- You can also skip steps 1-4. In a custom report, click Create a calculated metric.
- Name the calculated metric and add a description.
Tip: The added description appears on the metric’s tooltip.
- In Visibility, set: Author or All users. The All users option lets you share this calculated metric with other teammates.
- If you want to have this calculated metric available on all websites, mark All websites.
- Add a formula for your calculated metric using existing metrics from the list. You can use the following operators:
+
,-
,/
,*
.
- On the list, you’ll also find dimensions that can be transferred into metrics. Click a dimension to view available metrics.
Note: Only the listed transformations are avaliable. It’s not possible yet to use your own transformations.
- When your formula is ready, click Validate to check if the new metric is calculated correctly.
- In Formatting, pick a formatting type for the new metric. For example,
Percentage
.
- Optionally, in Display settings, decide to show or hide percentage of total in reports.
- When you’re done, click Create.
- 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:
- Go to Menu > Analytics.
- Navigate to Custom reports.
- Click Add new report.
- Pick the report type.
- Name the report.
- On the right, click Metrics > Calculated metrics.
- Build your new report using calculated metrics and other dimensions and metrics.
- When you’re done, click Create report.
To use calculated metrics in dashboards, follow these steps:
- Go to Menu > Analytics.
- Navigate to Dashboards.
- Click Add new dashboard.
- Add a name and set Visibility.
- Click Add widget and pick the widget type.
- On the right, click Metrics > Calculated metrics.
- Build the widget using calculated metrics and other dimensions and metrics.
- When you’re done, click Create widget.
- Add other widgets to your dashboard.
Edit, copy or delete a calculated metric
To edit, copy or delete a calculated metric, follow these steps:
- Go to Menu > Analytics.
- Navigate to Settings.
- On the left, click Calculated metrics.
- Pick the metric you want to work with.
- On the right, click a three-dot icon.
- 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}