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

whitebox-pro-server-plugin-conversions

v0.2.0

Published

WhiteBox server plugin — receives standard/custom conversion events from the browser (POST /conversions/events), records them into awareness, and fans out to the ad networks (Meta CAPI / GA4 MP / TikTok Events API) via whitebox-pro-adnetworks, deduped aga

Downloads

280

Readme

Conversions Plugin

Server side of conversion tracking — records each browser/server event as a first-party awareness signal and fans it out to the ad networks (Meta CAPI / GA4 MP / TikTok Events API), deduped against the browser pixels by event_id.

What it is

Server side of conversion tracking. Receives standard/custom conversion events from the browser (whitebox-pro-client-plugin-conversions), records each as a first-party awareness signal, and — consent permitting — fans it out to the ad networks (Meta CAPI / GA4 MP / TikTok Events API) through the shared whitebox-pro-adnetworks adapters, deduped against the browser pixels by event_id.

Config

import { conversions } from 'whitebox-pro-server-plugin-conversions'
import { meta } from 'whitebox-pro-adnetworks-meta'
import { tiktok } from 'whitebox-pro-adnetworks-tiktok'

conversions({
  auth: { secret: process.env.WB_CONVERSIONS_TOKEN },   // Bearer for GET /conversions/events
  // Compose the server-side (SST) networks — each a self-contained package
  // called with its creds. (GA4 is usually client-gtag only — see Dedup below.)
  networks: [
    meta({ pixelId: process.env.WB_META_PIXEL_ID, accessToken: process.env.WB_META_CAPI_TOKEN }),
    tiktok({ pixelCode: process.env.WB_TIKTOK_PIXEL_CODE, accessToken: process.env.WB_TIKTOK_EVENTS_TOKEN }),
  ],
  // Optional server-side consent enforcement (the client already gates on
  // marketing consent before sending, so this is OFF by default):
  // consent: { require: true, check: async (passportId) => /* … */ true },
})

A network only fires when its credentials are present (eligible). With no networks composed the plugin still records conversions into awareness — it just doesn't forward anywhere.

Endpoints

| Method | Path | Auth | Purpose | |---|---|---|---| | POST | /conversions/events | public | Browser ingress. Body { passport_id, events: [...], signals? }. | | GET | /conversions/events | Bearer | Inspect the audit log (?passport_id=&limit=&offset=). |

Trust model: the POST is public (the browser holds no secret). The passport_id the client carries — minted at /sessions/resolveis the identifier, same as the rest of the browser ingress. No session lookup.

Idempotency: event_id is unique. The browser may double-fire (sendBeacon on unload), and it's the key the network pixels dedupe on, so we do too.

Validation

Standard-event payloads validate against the same schemas the client uses (whitebox-pro-adnetworks/schemas), so client and server can never disagree about what a purchase looks like.

MCP

  • conversions.list_events — recent events + per-network delivery status (optionally per passport).
  • resource conversions-events.