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

engagepop

v0.1.0

Published

EngagePop web SDK — popups, social proof, feed & web push for web apps. Typed wrapper around the EngagePop widget.

Readme

EngagePop web SDK

Popups, social-proof toasts, notification feed & web push for web apps — engagepop.com.

This package is a typed, framework-friendly wrapper around the same EngagePop widget the <script> snippet loads. The widget itself is served from the EngagePop CDN, so it adds zero weight to your bundle and widget updates reach your site without a package bump.

npm install engagepop

Quick start

import { init, identify, track } from "engagepop";

init({ siteKey: "ep_..." }); // site key from Dashboard → Installation

// Optional: who is this visitor? (stays in THEIR browser — never sent to us)
identify({ email: "[email protected]", plan: "pro" });

// Optional: feed social proof / the live feed
track("purchase", { product: "Pro plan", name: "Ada", location: "Berlin" });

React / Next.js

import { EngagePopProvider } from "engagepop/react";

export default function App({ children }) {
  return <EngagePopProvider siteKey="ep_...">{children}</EngagePopProvider>;
}
import { useEngagePop } from "engagepop/react";

function BuyButton() {
  const ep = useEngagePop();
  return <button onClick={() => ep.track("purchase", { product: "Pro" })}>Buy</button>;
}

Both entry points are SSR-safe: on the server every call is a no-op, and the provider is a client component ("use client"), so it drops into a Next.js App Router layout as-is.

API

| Function | What it does | |---|---| | init({ siteKey, cdnUrl?, serviceWorkerPath? }) | Loads the widget. Idempotent; resolves when loaded. | | identify(attrs) | Sets visitor attributes for {{vars}} and audience targeting. Values are stored only in the visitor's browser (localStorage) and never sent to EngagePop. null deletes a key. Safe before load. | | reset() | Clears identified attributes — call on logout. | | track(type, props?) | Feeds an activity event ("purchase", "signup", …) to social-proof toasts and the dashboard live feed. Buffered until the widget loads. | | convert({ value?, order? }) | Reports a conversion on your thank-you page; attributed to the last campaign the visitor engaged with (7-day window). | | subscribePush() | Prompts for notification permission and subscribes the browser to your site's web push. Requires your service worker at serviceWorkerPath (default /sw.js) on your origin. | | pushSupported() | Whether this browser can do web push. | | ready() | Promise that resolves once the widget has loaded. |

Notes

  • Already using the snippet? The SDK detects an existing widget and won't load it twice — you can adopt the npm package incrementally.
  • SPA routing: the widget evaluates page targeting when it loads (same as the snippet). Campaigns targeted at specific paths match the URL at load time, not on client-side route changes.
  • Ad blockers: init() rejects if the script is blocked. All other calls are safe no-ops in that state — never gate your app on the widget.

License

MIT