0.0.6 • Published 4 years ago

@ktw-studio/analytics-scroll v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Analitycs scroll

If you need to report scroll progress but don't like old jQuery copy-paste scripts this is package for you.

Usage:

  1. This package exposes default export of Reporter class which access configuration object
  2. Create instance of this class and provide required data:
  3. Start watching by running .hookUp() method. It attaches window.scroll listener.
  4. To finish watching events .hookDown() method needs to be called
  5. Callback parameter will receive value of how far user has scrolled. It will ignore every step already scrolled, only the biggest value of progress will be passed.
  6. You need to provide your own implementation of throttle function (for example from lodash)
  7. You need to specify throttle time.
{
    step: number,
    callback: callback,
    throttleFunction: function,
    throttleTime: number,
}
0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago