timeonpage
v1.0.2
Published
See how long someone spends on a page
Downloads
6
Readme
Using npm:
$ npm install --save timeonpage
import into your view pageload
// using ES6
import timeonpage from 'timeonpage';
// using CommonJs
var timeonpage = require('timeonpage');
Methods
start
Starts the timer.
timeonpage.start();
pause
Pauses the timer.
timeonpage.pause();
stop
Stops the timer, and resets the timer to 0.
timeonpage.stop();
setSessionTimeout
After x
amount of seconds stops the timer.
timeonpage.setSessionTimeout(x);
getTime
Gets the current amount of time the page has been in use.
timeonpage.getTime();