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

@tickboxhq/cloud

v1.0.0

Published

Tickbox cloud beacon — POSTs consent-change events to the Tickbox audit log.

Downloads

1,636

Readme

@tickboxhq/cloud

Opt-in cloud beacon for Tickbox. POSTs every consent decision to the Tickbox audit log at api.tickbox.dev.

Without this package, the Tickbox SDK runs entirely locally — no data leaves the visitor's browser. Add it when you want a server-side audit trail.

Install

npm install @tickboxhq/cloud

Use

Add your dashboard-issued API key to your existing consent.config.ts:

import { defineConsent, jurisdictions } from '@tickboxhq/core'

export default defineConsent({
  jurisdiction: jurisdictions.UK_DUAA,
  policy: { version: '2026-05-14', url: '/privacy' },
  categories: { /* … */ },
  cloud: {
    apiKey: 'tb_pk_…',           // from app.tickbox.dev → your site
    // endpoint defaults to https://api.tickbox.dev — override only for self-hosting
  },
})

Then call installBeacon once at app startup, in a browser-only entry point.

Nuxt

// plugins/tickbox-cloud.client.ts
import { installBeacon } from '@tickboxhq/cloud'
import config from '~/consent.config'

export default defineNuxtPlugin(() => {
  installBeacon(config)
})

Next.js (App Router)

// app/tickbox-cloud.tsx
'use client'
import { useEffect } from 'react'
import { installBeacon } from '@tickboxhq/cloud'
import config from '@/consent.config'

export function TickboxCloud() {
  useEffect(() => installBeacon(config), [])
  return null
}

…then drop <TickboxCloud /> in your root layout.

Vanilla / SPA

import { installBeacon } from '@tickboxhq/cloud'
import config from './consent.config'

installBeacon(config)

That's it. Every consent decision fires a POST /v1/events to the Tickbox API. Failed posts go into a localStorage queue and retry on next page load (24 hour TTL).

What gets sent

{
  "visitorHash": "sha256 of a per-browser uuid (no PII)",
  "jurisdiction": "UK_DUAA",
  "policyVersion": "2026-05-14",
  "decisions": { "analytics": true, "marketing": false }
}

The Worker enriches each event with user_agent (from the request header) and country_code (from Cloudflare's CF-IPCountry header). No IP addresses are stored.

Why a separate package

The OSS SDK ships with no cloud dependency on purpose — sites that don't need an audit log don't pay for one. This package is opt-in and depends only on @tickboxhq/core for its config types.

SSR

installBeacon no-ops when document is unavailable, so it's safe to import unconditionally. For Nuxt prefer a .client.ts plugin anyway — the listener only matters in the browser.