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

@identityjs/tracker

v0.2.18

Published

Visitor fingerprinting, identification & analytics — drop-in script or npm package

Readme

identity-js

Visitor intelligence platform with browser fingerprinting, behavioral analytics, and real-time insights.

Dashboard & Docs: www.identity-js.com · Live Demo

  • 40+ fingerprint signals — canvas, WebGL, audio, fonts, speech voices, math quirks, screen, CPU, timezone
  • 11 behavioral trackers — dead clicks, phantom clicks, rage clicks, form abandonment, frustration scoring, reading behavior, input hesitation, error tracking, text copy, bot detection
  • Persistent visitor ID — survives cookie clears via fingerprint reconciliation
  • Bot detection — 0–100 score with detection reasons, no ML required
  • Custom eventsIdentityJS.track('signup', { plan: 'pro' })
  • SPA support — automatic page journey via pushState/popstate
  • Cookie-free — no cookies, no consent banners
  • Zero runtime dependencies — 29 KB gzipped
  • Fully managed — no servers to set up, everything runs on identity-js.com
  • Live demo — explore the full dashboard with sample data

Quick start

npm

npm install @identityjs/tracker
import IdentityJS from '@identityjs/tracker';

const visitor = await IdentityJS.init({
  apiKey: 'pk_live_YOUR_KEY',
});

console.log(visitor.visitorId); // e.g. "a3f2b1c4d5e6-k9m2"

Script tag (CDN)

<script src="https://cdn.jsdelivr.net/npm/@identityjs/tracker/dist/identity.min.js"></script>
<script>
  IdentityJS.init({
    apiKey: 'pk_live_YOUR_KEY',
  });
</script>

Get your API key at www.identity-js.com/dashboard.


API

IdentityJS.init(options?)

Returns Promise<VisitorObject>.

| Option | Type | Default | Description | |---|---|---|---| | apiKey | string | — | Project API key (pk_live_...) from your dashboard | | endpoint | string | https://www.identity-js.com/api/ping | API endpoint (no need to change this) | | onReady | function | — | Called with the visitor object once ready | | trackBehavior | boolean | true | Track clicks, scrolls, keystrokes | | trackSpaNavigation | boolean | true | Auto-track route changes | | sendOnLoad | boolean | true | Send fingerprint on page load | | sendOnUnload | boolean | true | Send session data on page close |

VisitorObject

{
  visitorId: string;        // Persistent ID (localStorage + cookie)
  sessionId: string;        // Per-tab session ID
  isNewVisitor: boolean;    // True on first ever visit
  fingerprintHash: string;  // Hash of stable signals
  signals: object;          // Full fingerprint signal set

  track(name: string, data?: object): void;  // Send custom event
  getBehavior(): object;                     // Live behavioral snapshot
  flush(): void;                             // Flush session data immediately
  destroy(): void;                           // Remove event listeners
}

IdentityJS.track(name, data?)

Queue-safe global track — works even before init() resolves.

IdentityJS.track('added_to_cart', { productId: 'abc', price: 29.99 });

// Works before init too:
IdentityJS.track('page_loaded');
IdentityJS.init({ apiKey: 'pk_live_...' }); // queued event flushed after init

Examples

React

import { useEffect } from 'react';
import IdentityJS from '@identityjs/tracker';

function App() {
  useEffect(() => {
    IdentityJS.init({
      apiKey: process.env.REACT_APP_IDENTITY_KEY,
      onReady: (v) => console.log('visitor', v.visitorId),
    });
  }, []);

  return <div />;
}

Next.js

// app/layout.js or pages/_app.js
import IdentityJS from '@identityjs/tracker';

if (typeof window !== 'undefined') {
  IdentityJS.init({ apiKey: process.env.NEXT_PUBLIC_IDENTITY_KEY });
}

Custom events

const visitor = await IdentityJS.init({ apiKey: 'pk_live_...' });

document.querySelector('#buy').addEventListener('click', () => {
  visitor.track('purchase_clicked', { plan: 'pro', price: 49 });
});

document.querySelector('form').addEventListener('submit', () => {
  visitor.track('form_submitted', { form: 'signup' });
});

What gets tracked automatically

Once you call init(), these trackers start automatically:

| Tracker | What it detects | |---|---| | Fingerprinting | 40+ browser signals combined into a stable hash | | Dead Clicks | Clicks on non-interactive elements | | Phantom Clicks | Clicks on elements that look clickable but aren't | | Rage Clicks | Rapid frustrated clicking | | Form Abandonment | Forms started but not submitted | | Input Hesitation | Time between focusing a field and first keystroke | | Reading Behavior | Scroll velocity classification (reading/skimming/scanning) | | Frustration Score | Weighted composite from rage clicks, dead clicks, errors, form abandons | | Error Tracking | JS exceptions, promise rejections, console errors | | Text Copy | When users copy text from your page | | Bot Detection | Automated visitor scoring with detection reasons |


License

MIT