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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@zaplier/sdk

v1.1.5

Published

Advanced privacy-first tracking SDK with session replay, heatmaps, and anti-adblock technology

Downloads

1,633

Readme

@zaplier/sdk

Advanced privacy-first tracking SDK with session replay, heatmaps, and anti-adblock technology.

Makes a website visitor identifier from a browser fingerprint with enhanced session recording capabilities. Unlike cookies and local storage, fingerprint stays the same in incognito/private mode and even when browser data is purged. 100% cookieless analytics tracking with GDPR/LGPD compliance, advanced bot detection, session replay, and heatmaps.

✨ Features

  • 🛡️ Privacy-First: 100% cookieless tracking using advanced fingerprinting
  • 🎬 Session Replay: Record and replay user sessions with DOM mutation tracking
  • 🔥 Heatmaps: Track clicks, scrolls, and user interactions
  • 🚫 Anti-Adblock: Multiple transport methods to bypass adblockers
  • 🤖 Bot Detection: Advanced bot and fraud detection
  • 🌍 GDPR Compliant: Built-in GDPR mode and consent management

Quick start

Get a workspace token:

  1. Register a new account at zaplier.com/signup
  2. After registration go to the dashboard and create a new workspace
  3. Go to the "API Keys" page, create and copy your workspace token

Install from NPM

npm i @zaplier/sdk
# or
yarn add @zaplier/sdk
import { Zaplier } from "@zaplier/sdk";

// Initialize the SDK
const zaplier = Zaplier.init({
  token: "your-workspace-token",
  heatmap: true,
  replay: true,
  debug: true, // Enable for development
});

// Track page views (automatic)
// Page views are tracked automatically

// Track conversions
zaplier.trackPurchase({
  value: 99.99,
  currency: "USD",
  items: [{ id: "product-123", name: "Product Name" }]
});

// Track custom events
zaplier.track("button_click", {
  button_id: "signup",
  page: "homepage",
});

// Identify users
zaplier.identify({
  email: "[email protected]",
  name: "John Doe"
});

// Get visitor data
console.log("Visitor ID:", zaplier.getVisitorId());

Alternatively you can install from CDN

<script src="https://cdn.jsdelivr.net/npm/@zaplier/sdk@1/dist/sdk.min.js" 
        data-token="your-workspace-token"
        data-heatmap="true"
        data-replay="true"></script>
<script>
  // SDK is automatically initialized from data attributes
  
  // Track custom events
  Zaplier.track("page_interaction", {
    element: "header_button",
    action: "click",
  });

  // Track conversions
  Zaplier.trackPurchase({
    value: 99.99,
    currency: "USD",
    items: [{ id: "product-123", name: "Product Name" }]
  });

  // Get visitor identifier
  console.log("Visitor ID:", Zaplier.getVisitorId());
</script>

Configuration Options

Zaplier.init({
  token: 'your-workspace-token',    // Required: Your workspace token
  heatmap: true,                    // Enable heatmap tracking
  replay: true,                     // Enable session replay
  debug: false,                     // Enable debug mode
  gdprMode: false,                  // Enable GDPR compliance mode
  allow_localhost: false            // Allow tracking on localhost
});

API Reference

Core Methods

  • Zaplier.init(config) - Initialize the SDK
  • Zaplier.track(eventType, data?) - Track custom events
  • Zaplier.trackPageView(data?) - Track page views
  • Zaplier.trackConversion(type, value?, currency?, metadata?) - Track conversions
  • Zaplier.identify(userData) - Identify users
  • Zaplier.getVisitorId() - Get current visitor ID

Heatmap Controls

  • Zaplier.heatmap.enable() - Enable heatmap tracking
  • Zaplier.heatmap.disable() - Disable heatmap tracking
  • Zaplier.heatmap.isRecording() - Check if recording

Session Replay Controls

  • Zaplier.replay.start() - Start session recording
  • Zaplier.replay.stop() - Stop session recording
  • Zaplier.replay.isRecording() - Check if recording

Anti-Adblock Technology

The SDK automatically uses multiple transport methods to ensure data delivery:

  1. Standard Fetch - Primary method
  2. WebSocket - Real-time fallback
  3. Resource Spoofing - Disguised as CSS/images/fonts
  4. WebRTC - P2P data channel (experimental)

Note that you need to replace your-workspace-token with a workspace token from the dashboard.