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

@quickpipeaiab/sdk

v1.0.2

Published

JavaScript/TypeScript SDK for sending analytics events to QuickPipe AI

Readme

@quickpipeaiab/sdk

JavaScript/TypeScript SDK for sending analytics events to QuickPipe. Follows standard event/analytics patterns (Segment, Mixpanel style).

Installation

npm install @quickpipeaiab/sdk
# or
yarn add @quickpipeaiab/sdk

Configuration

Set environment variables or pass config to the constructor:

| Env Variable | Config Option | Description | | ------------------------------ | --------------- | --------------------------------------------------------------------------------------------------------- | | QUICKPIPE_ANALYTICS_API_KEY | apiKey | API key for authentication (required) | | QUICKPIPE_ANALYTICS_ENDPOINT | endpoint | Base URL of the analytics API (default: https://analytics.quickpipe.ai; local: http://localhost:3002) | | QUICKPIPE_APPLICATION_ID | applicationId | Default workspace application id (Workspace.applicationId or slug) | | — | onLeadCreated | Callback after upsertLead() with leadId for storage and track() |

The API endpoint reads ANALYTICS_API_KEY from its environment and validates incoming requests against it.

Usage

Basic tracking

import { createAnalytics, STANDARD_EVENTS } from "@quickpipeaiab/analytics-sdk";

// Create/update lead first; store leadId from callback for PQL events
const analytics = createAnalytics({
  apiKey: process.env.QUICKPIPE_ANALYTICS_API_KEY,
  endpoint: "https://analytics.quickpipe.ai",
  applicationId: process.env.QUICKPIPE_APPLICATION_ID,
  onLeadCreated: ({ leadId }) => {
    // Recommended: persist `leadId` in your backend (e.g., DB) tied to the current user/session.
    // Demo only: storing in `localStorage` is convenient but not ideal (browser-only, can be cleared/modified).
    localStorage.setItem("quickpipe_lead_id", String(leadId));
  },
});

await analytics.upsertLead({
  email: "[email protected]",
  firstName: "Jane",
});

const leadId = Number(localStorage.getItem("quickpipe_lead_id"));

analytics.track(STANDARD_EVENTS.EMAIL_SENT, {
  leadId,
  eventTypes: ["email_sent", "delivered"],
  date: new Date().toISOString(),
});

// Flush immediately (otherwise batched every 5s or 10 events)
await analytics.flush();

Identify users

analytics.identify("user-123", {
  email: "[email protected]",
  name: "Jane Doe",
  applicationId: "app-456",
});

// Subsequent track() calls include userId
analytics.track(STANDARD_EVENTS.EMAIL_SENT, {
  eventTypes: ["email_sent"],
  applicationId: "app-456",
});

Convenience: track email events

analytics.trackEmail("email_sent", {
  email: "[email protected]",
  applicationId: "app-456",
  eventTypes: ["sent", "delivered"],
});

Environment-based config

// Uses QUICKPIPE_ANALYTICS_API_KEY and QUICKPIPE_ANALYTICS_ENDPOINT from env
const analytics = createAnalytics();

API

  • resolveWorkspace(applicationId?) – Map application id to internal workspaceId via GET /analytics/workspaces/resolve.
  • setApplicationId(id) – Set default application id for subsequent calls.
  • upsertLead(payload) – Create or update a lead (email, optional per-call applicationId, leadId, pqlScore, etc.). Returns { leadId, created, updated }. Invokes onLeadCreated on success.
  • setOnLeadCreated(callback) – Register or replace the lead-created callback at runtime.
  • track(event, properties) – Record an event. For PQL, include leadId in properties. applicationId comes from config or per-call override. Do not use workspaceId (rejected by SDK and API).
  • identify(userId, traits?) – Associate subsequent events with a user.
  • setAnonymousId(id) – Set anonymous ID for unauthenticated users.
  • flush() – Send queued events immediately.
  • reset() – Clear identity and queue.

Event batching

Events are batched and sent every 5 seconds or when 10 events are queued (configurable via flushInterval and flushAt).