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

@mentionable/tracker

v0.1.5

Published

Track AI bot crawls on your website. Monitor when GPTBot, ClaudeBot, PerplexityBot, Grok and others crawl your pages.

Downloads

65

Readme

@mentionable/tracker

Track AI bot crawls on your website. Monitor when GPTBot, ClaudeBot, PerplexityBot, Grok and others crawl your pages.

See which pages AI models are indexing, how often they come back, and correlate crawl data with your AI visibility on Mentionable.

Install

npm install @mentionable/tracker

Quick Start

Next.js

// middleware.ts
import { withMentionable } from '@mentionable/tracker/next'

export default withMentionable({
  apiKey: process.env.MENTIONABLE_API_KEY!,
})

export const config = {
  matcher: ['/((?!_next/static|_next/image|favicon.ico).*)'],
}

That's it. Every AI bot crawl is now tracked in your Mentionable dashboard.

Cloudflare Worker

// src/index.ts
import { withMentionable } from '@mentionable/tracker/cloudflare'

export default withMentionable({
  apiKey: 'mtbl_xxxxx', // or use env: true to read from MENTIONABLE_API_KEY env var
})
npx wrangler deploy

Works in front of any origin: Shopify, WordPress, custom backends. The Worker proxies the request and reports crawl data without adding any latency.

Existing Middleware (Next.js)

If you already have a middleware.ts, use the handler directly:

// middleware.ts
import { NextResponse } from 'next/server'
import { createMentionable } from '@mentionable/tracker/next'

const mentionable = createMentionable({
  apiKey: process.env.MENTIONABLE_API_KEY!,
})

export async function middleware(req) {
  // your existing logic
  mentionable.track(req)

  return NextResponse.next()
}

Existing Cloudflare Worker

import { createMentionable } from '@mentionable/tracker/cloudflare'

const mentionable = createMentionable({
  apiKey: 'mtbl_xxxxx',
})

export default {
  async fetch(request, env, ctx) {
    // your existing logic
    mentionable.track(request, ctx)

    return fetch(request)
  },
}

What Gets Tracked

The tracker sends minimal, non-sensitive data to the Mentionable API:

| Field | Description | | -------- | ---------------------------- | | ua | User-Agent header | | path | Request path (e.g. /pricing) | | host | Hostname | | method | HTTP method | | ip | Client IP (for bot identification) | | status | Response status code | | t | Timestamp |

No cookies, no request bodies, no personal data.

Configuration

withMentionable({
  // Required
  apiKey: 'mtbl_xxxxx',
})

How It Works

  1. The middleware intercepts incoming requests
  2. It forwards the User-Agent + request metadata to the Mentionable API (fire-and-forget, zero latency impact)
  3. Mentionable detects and classifies the bot server-side
  4. Data appears in your dashboard within seconds

The detection logic lives on Mentionable's servers, not in the package. When new AI bots emerge, they're detected automatically without any update on your end.

Performance

The tracker is designed to have zero impact on your site:

  • Non-blocking: requests are sent with fire-and-forget (no await)
  • Cloudflare: uses ctx.waitUntil() so the response is never delayed
  • Next.js: runs on the Edge Runtime, adds < 1ms overhead
  • Tiny payload: ~200 bytes per event

Get Your API Key

  1. Sign up at mentionable.com
  2. Go to Settings > API
  3. Copy your API key (starts with mtbl_)

Links

License

MIT