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

@onramp-sdk/web

v0.7.2

Published

OnRamp Analytics SDK for web apps - track onboarding steps and see where users drop off.

Readme

@onramp-sdk/web

OnRamp onboarding funnel analytics for web apps. Track where users drop off during onboarding - works with any JS framework.

getonramp.dev

Installation

npm install @onramp-sdk/web
# or
yarn add @onramp-sdk/web

Setup

1. Initialize

Call OnRamp.init() once at app start:

import { OnRamp } from '@onramp-sdk/web'

OnRamp.init({
  apiKey: 'onr_your_api_key',         // from the OnRamp dashboard
  host: 'https://your-ingestion-url',  // your ingestion API URL
  appVersion: '1.0.0',                // optional - enables version breakdown
  autoTrackScrollDepth: true,         // optional - defaults to true
})

The SDK automatically records real scrolls at 25%, 50%, 75%, and 90% of each page. Scroll events power page-depth analytics and engagement-aware bounce rate; they are not treated as funnel milestones.

2. Track milestones

Call OnRamp.step() at each meaningful moment in your onboarding flow:

// After account creation
OnRamp.step('account_created')

// After completing setup
OnRamp.step('profile_completed')

// After first meaningful action - attach properties for richer breakdowns
OnRamp.step('first_action_done', {
  properties: {
    plan: 'free',
    referrer: 'producthunt',
    items_added: 3,
  },
})

API

OnRamp.init(config)

| Option | Type | Required | Description | |---|---|---|---| | apiKey | string | ✓ | Your app's API key from the OnRamp dashboard | | host | string | | Ingestion API base URL (default: http://localhost:3001) | | appVersion | string | | App version string - enables version breakdown in dashboard | | autoTrackScrollDepth | boolean | | Record 25/50/75/90% page depth (default true) |

OnRamp.step(stepName, options?)

| Option | Type | Description | |---|---|---| | stepName | string | Identifier for this milestone - e.g. 'account_created' | | options.properties | Record<string, string \| number \| boolean> | Custom properties - become breakdown dimensions in the dashboard |

OnRamp.newSession()

Force-start a new session (e.g. after logout or page load into a new context).

OnRamp.flush()

Flush the event queue immediately. Called automatically on pagehide and visibilitychange.

How Funnels Work

Funnels are defined in the OnRamp dashboard, not in the SDK. You call OnRamp.step() with a step name - the dashboard lets you pick which steps belong to which funnel and in what order. No SDK changes needed when you iterate on your funnel structure.

Framework Notes

  • Next.js / SSR: Call OnRamp.init() on the client side only (inside useEffect or a client component). The SDK accesses localStorage and window - it is safe in SSR environments (access is guarded), but events are only tracked in the browser.
  • SPA routing: Call OnRamp.newSession() if you want a new session to start on a specific navigation event (e.g. user logs out and logs back in).

License

MIT