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

@antlytics/analytics

v0.1.6

Published

Privacy-first analytics SDK for Next.js and vanilla JS — by Antlytics.

Readme

@antlytics/analytics

Privacy-first analytics SDK for Next.js and vanilla JS.

  • No cookies for identity
  • Visit ID in sessionStorage with a 30-minute idle timeout
  • Sticky first-touch UTMs + referrer for the visit
  • Loads the hosted tracker (/tracker.js) — SPA, engagement, and Antlytics.track() stay current on redeploy

trackingId (Next / tracker) and siteId (client helper) are the same site UUID as ingest tracking_id.

Installation

npm install @antlytics/analytics
# or
pnpm add @antlytics/analytics

Next.js App Router

Drop the <Analytics /> component into your root layout. It loads the hosted tracker via next/script (strategy="afterInteractive").

// app/layout.tsx
import { Analytics } from "@antlytics/analytics/next"

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Analytics trackingId="YOUR_TRACKING_ID" />
      </body>
    </html>
  )
}

Your tracking ID is in the Antlytics dashboard under Settings → Getting Started.

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | trackingId | string | — | UUID tracking ID from your Antlytics dashboard | | apiHost | string | https://www.antlytics.com | Override if you use a first-party proxy |

Custom events

import { createAnalyticsClient } from "@antlytics/analytics"

const analytics = createAnalyticsClient({ siteId: "YOUR_TRACKING_ID" })
analytics.track("waitlist_signup", { plan: "pro" })

Or after the tracker loads: Antlytics.track("waitlist_signup") / window.antlytics.track(...).


First-party proxy (optional)

Some ad blockers block requests to third-party analytics domains. Mirror the ingest paths on your origin so pageviews, events, and engagement all forward.

1. Create proxy routes in your Next.js app:

// app/api/ingest/pageview/route.ts
export { GET, OPTIONS, POST } from "@antlytics/analytics/proxy"

// app/api/ingest/event/route.ts
import { event } from "@antlytics/analytics/proxy"
export const { GET, OPTIONS, POST } = event

// app/api/ingest/engagement/route.ts
import { engagement } from "@antlytics/analytics/proxy"
export const { GET, OPTIONS, POST } = engagement

2. Point <Analytics /> at your own domain:

<Analytics
  trackingId="YOUR_TRACKING_ID"
  apiHost="https://your-domain.com"
/>

Each handler forwards to https://www.antlytics.com/api/ingest/{kind} with the browser User-Agent and client IP (X-Antlytics-Client-Ip) and always returns 200 to the tracker.

Legacy app/api/antlytics/pageview/route.ts re-exporting the default POST still works for pageviews only — add event + engagement routes for full parity.


Vanilla / HTML

Prefer the hosted tracker (keeps SPA + idle + engagement current):

<script
  defer
  src="https://www.antlytics.com/tracker.js"
  data-tracking-id="YOUR_TRACKING_ID"
  data-api-host="https://www.antlytics.com"
></script>

Ingest API

Browser clients POST to:

| Path | Purpose | |------|---------| | /api/ingest/pageview | Navigations | | /api/ingest/event | Custom events | | /api/ingest/engagement | Scroll depth + active time |

| Field | Type | Required | Description | |-------|------|---------|-------------| | tracking_id | UUID | yes | Your site's tracking ID | | pathname | string | yes | URL path, e.g. /blog/post | | referrer | string | no | First-touch referrer for the visit | | session_id | UUID | no | Anonymous visit identifier | | utm_* | string | no | Sticky first-touch campaign fields (pageviews) |

Country and device type are detected server-side from request headers — you do not need to send them.


License

MIT © Antlytics