1.0.15 • Published 1 year ago

@kayn23/activitymonitor v1.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Activity

This module provides a simple interface for tracking the actual user activity on the page.

Instalation

npm i @kayn23/activitymonitor

Usage

import { Activity } from "@kayn23/activitymonitor";

const event10 = new Activity({
  achieveTime: 20,
  cookieName: "test_event_20",
  useMultiMode: true,
  callback: () => {
    console.log("achiev 20");
  },
});

event10.init();

Init params

fielddefaul valuedescription
achieveTime60time expiration
callbackfunctioncallback call after expiration time
cookieName'activity'cookie name, unique
forceStartfalsewhether to run expired achievements when visiting the page again
loopfalsere-track after oxpiration
eventList"touchmove blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error"list of events to track
testPeriod10user activity check interval
userMultiModefalseenable cookies for cross-page event checking
watchEvery1verification speed
1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago