How to Track Engaged Time in Google Analytics

Find out how much time users spend actively doing stuff on your site

Rob Flaherty
Google Analytics

--

Lately there’s been a surge of interest in time-based metrics focused on the amount of time users spend actively engaged during a session. Because standard analytics solutions like Omniture and Google Analytics don’t provide this data out of the box, to track these metrics you generally need a specialized analytics tool, something like Chartbeat for example.

But it’s actually possible to get these metrics using Google Analytics. Here’s how.

First, get the Riveted plugin, which is just a small piece of JavaScript that you add to your site. It’s available as plain JavaScript or a WordPress plugin (the following instructions assume you’re using the plain JavaScript implementation).

More information about what the plugin does can be found on the Riveted project page but basically it listens for user activity signals like scrolling, clicking, using the keyboard, and page visibility to determine whether the user is an active or idle state.

Next, after your Google Analytics tracking code, load the script and call the riveted.init() function, like this:

--

--