npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scroll-tracking-walkeros

v2.0.2

Published

Custom scroll tracking used as an additional source for WalkerOS.

Downloads

77

Readme

scroll-tracking-walkeros

A lightweight, ready-to-use custom walkerOS source for tracking a users scroll progress through an article or page.
Includes differnt customization possibilities. Supports both CommonJS and ES Modules.

Developed to be used as a source for walkerOS, an open-source event data collection by elbwalker.

 

📦 Installation

npm install scroll-tracking-walkeros
# or
yarn add scroll-tracking-walkeros

 

🚀 Usage

You can simply integrate it directly in your usual walkerOS configuration as a source:

// WalkerOS.tsx

import type { Collector, WalkerOS } from '@walkeros/core';
import { startFlow } from '@walkeros/collector';
import { sourceBrowser } from '@walkeros/web-source-browser';
import { sourceScroll } from 'scroll-tracking-walkeros'; // 1. Import it

declare global {
  interface Window {
    elb: WalkerOS.Elb;
    walker: Collector.Instance;
  }
}

export async function initializeWalker(): Promise<void> {
  if (window.walker) return;

  const { collector } = await startFlow({
    run: true,
    consent: { functional: true },
    sources: {
      browser: {
        code: sourceBrowser,
      },
      // 2. Add your scroll tracking source here
      scroll: {
        code: sourceScroll,
      }
    },
    destinations: {
      console: {
        code: {
          type: 'console',
          config: {},
          push(event, data) {
            console.log('Event:', event, data);
          },
        },
      },
    },
  });

  window.walker = collector;
}

There are various customization possibilities to fit your needs perfectly:

scroll: {
  code: sourceScroll,
  config: {
    settings: {
      // 1. Optional: Check scroll position every 10ms (performance optimization -> increase number)
      throttle: 10,
      // 2. Optional: Fire an event every 10% (e.g., 10%, 20%, 30%, 40%)
      threshold: 10,
      // 3. Optional: Only fire a new event if new max has been reached, else: fire every time throttle and threshold are satisfied
      onlyFireOnNewMax: true,
      // 4. Optional: Prefix for name of the event (e.g. "scroll depth")
      prefix: 'scroll',
      // 5. Optional: CSS Selector ID of the content wrapper
      articleSelector: '#main-content' 
    }
  }
}

Settings

| Setting | Scope | Type | Default | Description | | ------------------ | -------- | --------- | ---------------- | ------------------------------------------------------------------------ | | throttle | Optional | number | 250 | How often to check scroll position in ms | | threshold | Optional | number | 10 | At what increments should an event be triggered in % | | onlyFireOnNewMax | Optional | boolean | true | Only fire a new event if new max has been reached, else: fire every time | | prefix | Optional | string | 'scroll' | Prefix for the event name | | articleSelector | Optional | string | '#articlebody' | Selector for the article body |

⚠️ Important

For accurate scroll tracking, wrap your main scrollable content in an element like so and change the id:

<div id="articlebody">
  <!-- Your content -->
</div>

 

🛠 Development Notes

  • Designed for direct WalkerOS integration.
  • Dependencies:
    • "@walkeros/core": "^3.2.0"

 

📜 License

MIT - Developed by sleepycat666 for Public Value Technologies GmbH