engagement
Track engagement of user on page
Last updated 6 years ago by kylemathews .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install engagement 
SYNC missed versions from official npm registry.

Engagement

Track when a user is engaging with a page

New school media startups like Buzzfeed measure your attention not clicks. Chartbeat's CEO says the average reader spends ~15 seconds on an article. Don't just record clicks, record engagement.

This module tracks when a user is active on your web site by tracking mouse movements, scrolling, keyboard presses, and mouse clicks. It's easy to integrate with your own code to measure custom activity such as watching video.

The module emits a new 'active' signal at most every five seconds. This is because research has shown that a user on average pays attention to the page for five seconds after the last scroll/mouse movement/click.

Install

npm install engagement

How to use

var engagement = require('engagement');

engagement.listen = function() {
  // Record engagement event to internal/3rd party analytics system.
};

How to track custom types of engagement e.g. watching video

var engagement = require('engagement');

VideoPlayer.on('start', function() {
  interval = setInterval(function(){engagement.active()}, 500);
}
VideoPlayer.on('stop', function() {
  clearInterval(interval);
}

Current Tags

  • 1.1.2                                ...           latest (6 years ago)

4 Versions

  • 1.1.2                                ...           6 years ago
  • 1.1.1                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (8)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |