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

11metrics-pixel-react-native

v0.1.0

Published

Official 11metrics tracking SDK for React Native apps. Zero native dependencies — pure-JS SHA-256 hashing, a pluggable storage adapter for persistent anonymous IDs, and an optional React Navigation integration for automatic screen-view tracking.

Readme

11metrics-pixel-react-native

Official 11metrics tracking SDK for React Native apps. Talks to the same POST /api/pixel endpoint the web pixel.js SDK uses — no backend changes required to start receiving mobile events.

Zero native dependencies: hashing is pure-JS SHA-256 (no crypto.subtle, no native crypto module to link), and identity persistence is a pluggable storage adapter rather than a hard dependency on any specific storage library. Works in Expo Go and bare React Native alike.

Install

npm install 11metrics-pixel-react-native

Usage

// App.tsx
import AsyncStorage from '@react-native-async-storage/async-storage'; // recommended, not required
import { init, screenView, track, identify } from '11metrics-pixel-react-native';

init({
  pixelId: 'YOUR_PIXEL_ID', // Settings → Pixel Setup in the 11metrics app
  pixelUrl: 'https://app.11metrics.ai', // optional, this is the default
  storage: AsyncStorage, // optional — omit to fall back to in-memory (resets each app restart)
});

// Manual screen tracking.
screenView('ProductDetail', { product_id: 'abc123' });

// Custom event.
track('button_press', { button: 'checkout' });

// After login. email/phone are hashed on-device before anything is sent.
identify({ email: '[email protected]', first_name: 'Marco' });

Automatic screen tracking with React Navigation

import { NavigationContainer } from '@react-navigation/native';
import { trackNavigationStateChange } from '11metrics-pixel-react-native';

export default function App() {
  return (
    <NavigationContainer onStateChange={trackNavigationStateChange}>
      {/* ... */}
    </NavigationContainer>
  );
}

Not using React Navigation? Call screenView(name) yourself wherever your navigation library exposes a focus/route-change event.

Why no native dependencies

  • Hashing: crypto.subtle isn't reliably available across React Native's JS engines (Hermes/JSC) and versions. Rather than require a native crypto module (native linking, pod install, Expo config plugins — friction most SDKs don't need to impose), this package ships its own pure-JS SHA-256 implementation, verified against known FIPS test vectors (see smoke-test.mjs).
  • Storage: there's no browser-localStorage equivalent built into React Native's JS runtime — every persistence option (AsyncStorage, MMKV, SecureStore) is a native module. Rather than pick one and force it on every consumer, init({ storage }) accepts anything with a getItem/setItem shape. @react-native-async-storage/async-storage is the recommended default (it's already in most React Native apps), but MMKV or your own adapter both work identically.
  • React Navigation: trackNavigationStateChange accepts state: unknown rather than importing @react-navigation/native's types, so this package has zero dependency on it — apps using a different navigation library (or none) simply don't call that function.

API

  • init(config: { pixelId: string; pixelUrl?: string; storage?: StorageAdapter })
  • screenView(screenName, meta?) — sent as event: "pageview", same event type web uses, so mobile screen views land in the same reports as web pageviews with no extra setup.
  • track(name, meta?) — custom event.
  • identify(data){ email?, phone?, first_name?, last_name? }.
  • getAnonymousId() — the persisted per-device anonymous id.
  • trackNavigationStateChange(state) — wire into React Navigation's onStateChange for automatic screen tracking.

Local development

npm install
npm run build
npm test    # runs the build, then sha256 + payload smoke tests

Publishing

npm run build
npm test
npm login          # once, with your npm account
npm publish         # from this directory

Bump version in package.json first if this isn't the first release.