Riveted is a Google Analytics plugin that tracks how much time users spend actively engaged on a page.
It has no dependencies and supports Universal Analytics, Classic Google Analytics, and Google Tag Manager.
Implementation information is on the project page. This plugin is still in beta.
Background and more details can be found in this blog post.
// Basic
riveted.init();
// With some options
riveted.init({
reportInterval: 10,
idleTimeout: 20,
nonInteraction: false
});
Riveted is also available as a WordPress plugin.
- Upload the
wp-plugin/riveted
directory into the/wp-content/plugins/
directory on your server. - Activate the plugin through the 'Plugins' menu in WordPress.
- If you'd like to modify the default settings, go to the Riveted panel under Settings.
If you'd like to integrate with Google Tag Manager, here are the dataLayer variable names:
- Riveted Event Name = Riveted
- Event Category = {{eventCategory}}
- Event Action = {{eventAction}}
- Event Label = {{eventLabel}}
- Event Value = {{eventValue}}
- Event Non-Interaction = {{eventNonInteraction}}
- User Timing Event Name = RivetedTiming
- Timing Variable = {{timingVar}}
- Timing Value = {{timingValue}}
Tested in latest versions of Chrome, Firefox, Safari, and Opera. Internet Explorer 8-11. iOS and Android.
If you have any questions you can find me on Twitter at @robflaherty.
0.3.1 (6/4/14): Fixed IE8 bug.
0.3 (2/17/14): Added WordPress plugin.
0.2.1 (2/13/14): Fixed Non-Interaction option.
0.2 (2/13/14): Fixed GTM double firing.
0.1 (2/9/14): Initial release.