What are dimensions and metrics?

A dimension is a data attribute and has a non-quantitative value. A metric is paired with a dimension and has a quantitative value. For example, a page title is a dimension, and a page view is a metric.

When you look at any core report in Analytics, a dimension will appear in the first column. In other columns, usually will be metrics. Sometimes, the report will also have nested dimensions. For example, the page report has a dimension page title, metrics page views, unique page views, entries, bounce rate, and exit rate. It also has nested dimensions, such as, channel, device type, device model.

An example of a dimension in the analytics report.

About event and session scope

Dimensions and metrics belong to an event or a session scope. An event is an individual interaction during a session. A session includes all events during an entire visit. We can illustrate the difference between them in the following way.

An example of an event and session scope.

Now, let’s see a few examples.

Event scope

Here are some samples of dimensions from an event scope:

  • Page URL: The URL of the page on which the event was tracked.
  • Search keyword: A query that a visitor typed in the search on your website.
  • Goal name: The name of a goal set for your website.

Here are some samples of metrics from an event scope:

  • Page view: The total number of times a page was visited.
  • Searches: The total number of searches on your website.
  • Goal conversions: The total number of conversions for goals.

Session scope

Here are some samples of dimensions from a session scope:

  • Campaign: A campaign from which a visitor came to the website and started a session.
  • Device type: The type of the device used by a visitor during the session.
  • Session entry URL: The URL of the page from which the session has started.

Here are some samples of metrics from a session scope:

  • Sessions: The total number of sessions.
  • Average session time: An average time of session duration.
  • Bounce rate: The percentage of sessions during which visitors viewed only one page and didn’t continue to another page view, goal conversion, or e-commerce conversion.

Dimensions and metrics in custom reports

Because of an event and a session scope, you can’t combine an event dimension with a metric calculated for a session dimension. They need to belong to the same scope. See the examples below:

  • Correct: page URL (event scope) + page view (event scope)
  • Incorrect: page URL (event scope) + average session time (session scope)

So when you are creating a custom report, you need to check if you’re pairing the right data. Otherwise, the report won’t work.

The same rule applies when you’re using a filter or segment. You need to use dimensions and metrics from the same scope when adding a filter or segment to the report. 

Tip: In custom reports, dimensions are marked with green and metrics with blue. Additionally, dimensions from an event scope are marked with a black flag.

How a report is calculated

Now, let’s take a closer look at how data is calculated for a report. This will help you better understand dimensions, metrics, and scopes.

Here’s an example of events that happened on the Clear Bank website.

Event type Page URL (path) Device type Goal name Goal revenue
Event 1 Goal conversion /product-tour/ Desktop App signup $50
Event 2 Site search /help/ Mobile
Event 3 Page view /blog/ Mobile
Event 4 Goal conversion /blog/ Desktop Newsletter signup $5

Everything that you can see in the header row of the example is a dimension — event type, page URL (path), device type, goal name, and goal revenue. 

A metric is something that can be calculated for a dimension. Let’s see two examples.

Page URL (path) Events Goal conversion Sum of goal revenue
/product-tour/ 1 1 $50
/help/ 1 0 0
/blog/ 2 1 $5

In this case, a page URL (path) is a dimension, and events, a goal conversion, and a sum of goal revenue are metrics.

Device type Events Goal conversion Sum of goal revenue
Desktop 2 2 $55
Mobile 2 0 0

In this case, a device type is a dimension, and events, a goal conversion, and a sum of goal revenue are metrics.

Some metrics are simple counters, others are calculated based on dimension values. For the latter, you need to convert a dimension to a metric.

Once you start using Analytics, you’ll become familiar with both metrics and dimensions. Our app will help you create reports for the right scope — if you mix it incorrectly, you’ll see an error message.  

Was this article helpful?

Be the first to rate this article.

Technical Support

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

We’re happy to help!