How it works

The AdsPing model in one page: pixels capture, pipelines forward, platforms dedupe.

Core objects

ObjectWhat it representsExample
PixelOne per domain. Has its own subscription, event quota, and install snippet.acme.com
PipelineA forwarding rule on a pixel: events → one destination with config.Meta CAPI for Lead events
EventA single tracked action (PageView, Lead, Purchase…). Each event_id is unique.Lead event_id=abc-123

A pixel can have many pipelines. Common setup for a lead-gen site:

  • Meta CAPI pipeline — forwards all events
  • TikTok Events pipeline — forwards all events
  • Google Ads pipeline #1 — forwards only Lead
  • Google Ads pipeline #2 — forwards only AppointmentRequest

Event flow

From the moment a visitor clicks a button on your site to the platform Test Events tab, here's every hop:

text
Visitor clicks button
  ↓
pb.js intercepts (form submit / fbq / ttq / dataLayer / auto-tracking)
  ↓
pb.js POSTs JSON event → adsping-backend (your endpoint, your domain)
  ↓
Backend validates → stores in Postgres → enqueues 1 BullMQ job per pipeline
  ↓
Worker picks up job → reads pipeline.config → calls platform API
  ↓
Platform API logs event in Events Manager / Conversions Diagnostics
  ↓
(Test Event Code set?) → routed to platform's Test Events tab
(Otherwise) → counted toward production attribution
The backend is queue-driven. Even if Meta is briefly down, your events sit in BullMQ and retry with exponential backoff for ~2 hours. You'll see the pipeline turn yellow ("degraded") but no events are lost.

Browser/server deduplication

Both Meta and TikTok recommend using browser pixel + server API together. AdsPing makes this work without you writing any code:

  • pb.js mints a fresh event_id for every event.
  • That id flows to the browser pixel call (fbq, ttq) AND the server-side request body.
  • Each platform sees two events with the same id within a short window → counts them once, but with combined match signals (browser fingerprint + server-side IP/email/phone).

Result: you don't lose data when one channel fails (e.g. adblocker breaks browser pixel — server still fires) AND match quality stays high.

Match quality

Match quality is each platform's estimate of how well the event attaches to a user record. AdsPing maximizes it by:

  • Form auto-capture. When pb.js sees a form submit, it harvests email/phone/name/address fields from inputs, hashes them client-side (SHA-256), and forwards as Advanced Matching parameters.
  • Click ID capture. pb.js reads fbclid, gclid, gbraid, wbraid, ttclid from the URL and stores them in a first-party cookie. Every event gets the right click ID auto-attached.
  • Network intercept. If the merchant's own code calls fbq('init', …, { em, ph }), pb.js mirrors those values into our payload too.
  • Server enrichment. The backend adds client IP, user agent, and event source URL — fields the browser pixel doesn't always populate.

Auto-injected browser pixels

For Meta and TikTok, pb.js can load the platform's official browser script for you — so you don't need to paste two scripts. When the merchant has a Meta/TikTok pipeline configured, pb.js fetches the pixel ID/code from your backend and injects:

  • connect.facebook.net/en_US/fbevents.js for Meta
  • analytics.tiktok.com/i18n/pixel/events.js for TikTok

Each loads only if window.fbq / window.ttq isn't already defined — so if a merchant has their own snippet, we never overwrite it. PageView is fired with the shared event_id immediately after init.

This is why a single AdsPing script tag gives you complete coverage — you don't need to also paste the Meta or TikTok pixel snippet.