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

@linkrivers/tracker

v1.0.0

Published

LinkRivers analytics tracker for React, Next.js, Vue, and vanilla JS

Readme

@linkrivers/tracker

Official LinkRivers analytics tracker for JavaScript applications.

Installation

npm install @linkrivers/tracker
# or
yarn add @linkrivers/tracker
# or
pnpm add @linkrivers/tracker

Usage

Vanilla JavaScript

import { init, track, identify } from '@linkrivers/tracker';

// Initialize
init({
  id: 'YOUR_SITE_ID',
  // Optional settings
  endpoint: 'https://api.linkrivers.com',
  analytics: true,      // Web vitals, clicks, scroll (default: true)
  security: true,       // Security scanning (default: true)
  technographics: true, // Tech stack detection (default: true)
  funnels: false,       // Goals & funnels (default: false)
  ecommerce: false,     // E-commerce tracking (default: false)
  respectDNT: true      // Respect Do Not Track (default: true)
});

// Track custom events
track('button_click', { button_id: 'signup' });

// Identify users
identify('[email protected]', { plan: 'pro' });

React

import { useLinkrivers, track } from '@linkrivers/tracker/react';

function App() {
  useLinkrivers({ id: 'YOUR_SITE_ID' });

  return (
    <button onClick={() => track('signup_click')}>
      Sign Up
    </button>
  );
}

Next.js (App Router)

// app/layout.tsx
import { LinkRiversScript } from '@linkrivers/tracker/react';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <LinkRiversScript id="YOUR_SITE_ID" />
      </body>
    </html>
  );
}

Next.js (Pages Router)

// pages/_app.tsx
import { useLinkrivers } from '@linkrivers/tracker/react';

function MyApp({ Component, pageProps }) {
  useLinkrivers({ id: 'YOUR_SITE_ID' });
  return <Component {...pageProps} />;
}

export default MyApp;

Vue 3

<script setup>
import { useLinkrivers, track } from '@linkrivers/tracker/vue';

useLinkrivers({ id: 'YOUR_SITE_ID' });

function handleClick() {
  track('button_click', { id: 'signup' });
}
</script>

<template>
  <button @click="handleClick">Sign Up</button>
</template>

Vue Plugin (Global)

// main.ts
import { createApp } from 'vue';
import { LinkRiversPlugin } from '@linkrivers/tracker/vue';
import App from './App.vue';

const app = createApp(App);
app.use(LinkRiversPlugin, { id: 'YOUR_SITE_ID' });
app.mount('#app');

Nuxt 3

// plugins/linkrivers.client.ts
import { init } from '@linkrivers/tracker';

export default defineNuxtPlugin(() => {
  init({ id: 'YOUR_SITE_ID' });
});

SvelteKit

<!-- src/routes/+layout.svelte -->
<script>
  import { onMount } from 'svelte';
  import { init, track } from '@linkrivers/tracker';

  onMount(() => {
    init({ id: 'YOUR_SITE_ID' });
  });
</script>

<slot />

Astro

---
// src/layouts/Layout.astro
---
<html>
  <head>
    <script>
      import { init } from '@linkrivers/tracker';
      init({ id: 'YOUR_SITE_ID' });
    </script>
  </head>
  <body>
    <slot />
  </body>
</html>

API Reference

init(config)

Initialize the tracker.

| Option | Type | Default | Description | |--------|------|---------|-------------| | id | string | required | Your site tracking ID | | endpoint | string | https://api.linkrivers.com | API endpoint | | analytics | boolean | true | Enable Web Vitals, clicks, scroll tracking | | security | boolean | true | Enable security scanning | | technographics | boolean | true | Enable tech stack detection | | funnels | boolean | false | Enable goals & funnels | | ecommerce | boolean | false | Enable e-commerce tracking | | respectDNT | boolean | true | Respect Do Not Track header |

track(eventName, properties?)

Track a custom event.

track('purchase', { product_id: '123', price: 99.99 });

identify(userId, traits?)

Identify a user for cross-session tracking.

identify('[email protected]', { name: 'John', plan: 'pro' });

load(module)

Manually load an optional module.

load('ecommerce'); // Load e-commerce tracking

License

MIT