
Product
Socket for ClickUp Is Now Available
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.
One canonical conversion event, fanned out to every ad platform — server-side Conversions APIs + audience sync. SDK + CLI + MCP. "Stripe for ad-conversion tracking."
One canonical conversion event, fanned out to every ad platform's server-side Conversions API and audience-sync API. Fire one typed event; adscapi hashes the identity, maps the event name per platform, and dispatches to each one you've configured.
Ships four ways from one package: an SDK you import, a CLI, an MCP server any agent can drive, and a hosted relay so a backend in any language can POST one event over HTTP.
import { createAdscapi } from 'adscapi';
const ads = createAdscapi(); // reads platform tokens from the environment
const results = await ads.conversions.track({
name: 'purchase',
value: 49,
currency: 'USD',
user: { email: 'jane@example.com' }, // raw — adscapi hashes advanced-matching fields per platform
clickIds: { fbclid: '…', gclid: '…' }, // captured server-side
consent: { adUserData: true, adPersonalization: true }, // optional: gppString, tcfString, limitedDataUse
});
// results: [{ platform: 'meta', ok: true }, { platform: 'tiktok', ok: false, error: '…' }, …]
A platform is active only when its secrets are present, so the same call works
whether you run one platform or twenty-six. One platform failing never blocks the
rest — you get a result per destination instead of an exception. user accepts the
full advanced-matching set (name, city, state, zip, country, DOB, gender,
externalId, ip, userAgent, fbc/fbp); more match keys raise match rate and lower CAC.
consent also accepts optional IAB gppString / gppSectionIds / tcfString and a
limitedDataUse flag (CCPA). GA4 always gets Consent Mode (GRANTED/DENIED) so
Google can model conversions under signal loss; Meta gets Limited Data Use when the
flag is set.
Every ad platform wants the same thing — "this user converted, here's the hashed identity" — but each has its own Conversions API, its own event names, its own token dance. The official SDKs are one platform each; the hosted tools (Servo, Stape) are no-code SaaS; the CDPs (Segment, RudderStack) are heavyweight and ad-tracking is a side feature. adscapi is the missing middle: a code-first library that does ad-conversion fan-out and nothing else.
ads.conversions.track() fans one event to 26 platforms'
server-side Conversions APIs. PII hashing, per-platform event mapping,
cross-platform dedup, retries, dryRun, and a per-call destinations toggle are
built in. track(event, { testEventCodes: { meta: 'TESTxxxxx' } }) sends a real event
to the platform's Test Events view (vs dryRun, which sends nothing).ads.audiences.sync() uploads a hashed customer list to 28
platforms' audience APIs.uploadOffline() batch-uploads offline conversions from a
CSV to Bing, Google Ads, and Meta.uploadCreative() uploads an ad image (Meta today; more landing
per PR).fromAcpCheckoutSession() / fromAp2PaymentMandate() turn a
settled ACP or AP2 agent purchase (no browser, no pixel) into a canonical event you
track. So the ad that drove the agent still gets credit. See
docs/AGENT-COMMERCE.md.getReport() pulls spend, impressions, conversions, and
ROAS back from Meta, Google Ads, and TikTok to close the loop. See
docs/REPORTING.md.Governor gates dispatch with a kill-switch, approval gate,
rate cap, and audit trail for agents running under governed autonomy. See
docs/GOVERNANCE.md.onResult hook.
See docs/OBSERVABILITY.md.(metric_id, qualifier) measurement
taxonomy. See docs/ADCP.md.fetch and
WebCrypto, no Node built-ins.npx adscapi mcp.adscapi ships no per-framework SDK — there's one library, and you call it from your stack. The relay and CLI cover everything that isn't JavaScript.
npx adscapi platforms # every destination + the secrets it needs
npx adscapi init # interactive setup: prompts for missing secrets, writes .env
npx adscapi check # which platforms are configured right now
npx adscapi verify # live-check that configured tokens actually work
npx adscapi doctor # health check across configured platforms (nonzero exit on failure)
npx adscapi test-event --event purchase --email you@example.com --dry-run
npx adscapi offline --platform bing --file conversions.csv
npx adscapi creatives upload --platform meta --image https://cdn.example.com/hero.jpg
doctor exits non-zero when any configured platform fails its live check, so you can
run it in cron or CI as a health gate.
check reads your environment; verify goes further and calls each platform's API to
confirm the token is valid — so you catch an expired token before a real event does.
Deploy the Cloudflare Worker in worker/, set your platform secrets on it,
and any backend can fan out with one HTTP call:
curl -X POST https://<your-worker>/track -H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"purchase","value":49,"currency":"USD","user":{"email":"a@b.com"},"consent":{"adUserData":true,"adPersonalization":true}}'
Platform secrets live on the Worker, never in the caller's request. See
worker/README.md.
// .mcp.json
{ "mcpServers": { "adscapi": { "command": "npx", "args": ["-y", "adscapi", "mcp"] } } }
Fan-out is table stakes; match quality is where cost per acquisition actually moves.
docs/MATCH-QUALITY.md is the playbook: which identifiers to
send, how to optimize for value, how to dedup and protect the signal under consent loss,
and how to read Meta's match-quality score as you tune.
Each destination has a setup guide in docs/platforms/: how to
create the account, where each token comes from, and how to verify it. Start with
Meta. Each conversion platform records the API doc it was
built against; npm run check:docs reports which are freshly verified and flags any
dead doc links.
Live on npm. Twenty-six conversion platforms and twenty-eight audience-sync platforms
ship against their real API docs, plus offline CSV import (Bing, Google, Meta) and
image creatives (Meta). Five conversion platforms carry a live credential check today;
the rest are marked unverified and re-checked over time. The agent-native suite —
ACP/AP2 checkout adapters, spend/ROAS read-back, governance, a delivery log, and AdCP
measurement interop — ships alongside. Branch model: main is staging, release
publishes to npm.
MIT
FAQs
One canonical conversion event, fanned out to every ad platform — server-side Conversions APIs + audience sync. SDK + CLI + MCP. "Stripe for ad-conversion tracking."
The npm package adscapi receives a total of 119 weekly downloads. As such, adscapi popularity was classified as not popular.
We found that adscapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.