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

@entrolytics/vue-sdk

v2.2.0

Published

Vue SDK for Entrolytics - First-party growth analytics for the edge

Readme

npm License: MIT TypeScript Vue


Overview

@entrolytics/vue-sdk is the official Vue SDK for Entrolytics - first-party growth analytics for the edge. Add powerful analytics to your Vue 3 applications with zero configuration.

Why use this SDK?

  • Zero-config setup with automatic environment detection
  • Full Vue 3 Composition API support with composables
  • TypeScript-first with complete type definitions
  • Edge-optimized with sub-50ms response times globally

Key Features

Analytics

  • Automatic page view tracking
  • Custom event tracking
  • User identification
  • Cross-domain tracking

Developer Experience

  • Vue plugin architecture
  • Composables API (useTrackEvent, useIdentify)
  • Global $entrolytics property
  • Full TypeScript support

Quick Start

Installation

npm install @entrolytics/vue-sdk
# or
pnpm add @entrolytics/vue-sdk

Quick Start

// main.ts
import { createApp } from 'vue';
import { createEntrolytics } from '@entrolytics/vue';
import App from './App.vue';

const app = createApp(App);

// Zero-config: automatically reads from .env
app.use(createEntrolytics());

app.mount('#app');

Add to your .env file:

VITE_ENTROLYTICS_WEBSITE_ID=your-website-id
VITE_ENTROLYTICS_HOST=https://entrolytics.click

Configuration Options

Zero-Config (Recommended)

// Reads from VITE_ENTROLYTICS_WEBSITE_ID and VITE_ENTROLYTICS_HOST
app.use(createEntrolytics());

Explicit Configuration

createEntrolytics({
  // Required: Your Entrolytics website ID
  websiteId: 'your-website-id',

  // Optional: Custom host (for self-hosted)
  host: 'https://entrolytics.click',

  // Optional: Auto-track page views (default: true)
  autoTrack: true,

  // Optional: Use edge-optimized endpoints (default: true)
  useEdgeRuntime: true,

  // Optional: Respect Do Not Track (default: false)
  respectDnt: false,

  // Optional: Cross-domain tracking
  domains: ['example.com', 'blog.example.com'],
});

Runtime Configuration

The useEdgeRuntime option controls which collection endpoint is used:

Edge Runtime (default) - Optimized for speed and global distribution:

createEntrolytics({
  websiteId: 'your-website-id',
  useEdgeRuntime: true // or omit (default)
});
  • Latency: Sub-50ms response times globally
  • Best for: Production Vue applications, globally distributed users
  • Endpoint: Uses /api/send-native for edge-to-edge communication
  • Limitations: No ClickHouse export, basic geo data

Node.js Runtime - Full-featured with advanced capabilities:

createEntrolytics({
  websiteId: 'your-website-id',
  useEdgeRuntime: false
});
  • Features: ClickHouse export, MaxMind GeoIP (city-level accuracy)
  • Best for: Self-hosted deployments, advanced analytics requirements
  • Endpoint: Uses /api/send for Node.js runtime
  • Latency: 50-150ms (regional)

When to use Node.js runtime:

  • Self-hosted Vue deployments without edge runtime support
  • Applications requiring ClickHouse data export
  • Need for advanced geo-targeting with MaxMind
  • Custom server-side analytics workflows

Composables

useEntrolytics

Main composable for accessing all functionality.

<script setup>
import { useEntrolytics } from '@entrolytics/vue';

const { track, identify, isLoaded, config } = useEntrolytics();

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

<template>
  <button @click="handleClick">Click me</button>
</template>

useTrackEvent

Track custom events.

<script setup>
import { useTrackEvent } from '@entrolytics/vue';

const { track } = useTrackEvent();

function handlePurchase() {
  track('purchase', {
    revenue: 99.99,
    currency: 'USD',
    product_id: 'pro-plan'
  });
}
</script>

useTrackPageView

Track page views with vue-router.

<script setup>
import { useRoute } from 'vue-router';
import { useTrackPageView } from '@entrolytics/vue';

const route = useRoute();
useTrackPageView(() => route.path);
</script>

useIdentify

Identify users for logged-in tracking.

<script setup>
import { watch } from 'vue';
import { useIdentify } from '@entrolytics/vue';

const { identify } = useIdentify();

// When user logs in
watch(user, (newUser) => {
  if (newUser) {
    identify(newUser.id, {
      email: newUser.email,
      plan: newUser.subscription
    });
  }
});
</script>

Global Property

The plugin also adds a global property accessible in templates and options API:

<script>
export default {
  methods: {
    trackClick() {
      this.$entrolytics.track('button_click');
    }
  }
}
</script>

TypeScript Support

Full TypeScript support with exported types:

import type {
  EntrolyticsOptions,
  EntrolyticsInstance
} from '@entrolytics/vue';

License

MIT License - see LICENSE file for details.