Time spent analysis

Amplitude calculates the time spent on an event as the duration between consecutive events of the specified type. To prevent long periods of inactivity from skewing the analysis, Amplitude applies a 30 minute timeout. If no events of the specified type occur within a 30 minute window, Amplitude closes the current time spent window, and begins a new window with the next event.

Feature availability

Time spent analysis, like other custom metrics, is available to accounts on the Growth or Enterprise plan. For more information, see the Amplitude pricing page.

When you specify a group-by property, for example page URL or page type, any change in its value resets the time spent window. This ensures that Amplitude can accurately attribute time spent to the specific value of the group-by property at the beginning of each window.

In the following example, the timeline represents a set of consecutive page views and their associated page types.

Page type Time spent
Landing 10 minutes
ViewItem 20 minutes
Checkout 7 minutes

Supported event types

Amplitude supports using any event type to define a time spent metric. However, page view events are most commonly used for this analysis. You can define page view events a few ways:

  • Primitive page view event: A basic event specifically designed to track page views. For example, the pre-defined [Amplitude] Page View event.

  • Any active event where Event Name ∈ 'Page View': Some taxonomies define page view at the property level. Use a filter to limit event selection to names that contain page view.

  • Custom page view event: A combination of primitive events that collectively represent a page view.

Use time spent metrics in data tables

Time spent metrics are available in data tables. Use these metrics to gain insight into user behavior like:

Metric Definition
Total time spent on page The cumulative time spent by all users on a specific page or set of pages.
TimeSpent(PV)
Time spent per user The average time users spend viewing pages on your site.
TimeSpent(PV) / Uniques(PV where TimeSpent(PV) > 0)
Time spent per page view The average time spent per page view event.
TimeSpent(PV) / Totals(PV where TimeSpent(PV) > 0)
Time spent per session The average time spent on page views per session.
TimeSpent(PV) / SessionTotals(where TimeSpent(PV) > 0)

Time spent metrics return results in the specified unit of time, for example seconds, minutes, or hours.

Note

The last page view in a session isn't measured for time spent because there is no subsequent page view event to measure. Sessions with a single page view (bounces) behave similarly for the same reason.

Create a time spent metric

To create a new time spent metric:

  1. Create a new, or open existing Data Table.
  2. Click +Add Event or Metric.
  3. Select the Metrics tab in the dialog. Click +Define new Metric.
  4. In the Metric Type selection, scroll down to the Time Spent metrics and select the metric you want to use.
  5. Optionally apply a filter to the event and select the unit of time.
  6. Click Save.
Was this page helpful?

Thanks for your feedback!

January 21st, 2025

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2025 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.