Skip to content

Meta Pixel + CAPI

Terminal window
npm install @junctionjs/destination-meta
import { createCollector } from "@junctionjs/core";
import { meta } from "@junctionjs/destination-meta";
const collector = createCollector({
destinations: [
{
destination: meta,
config: {
pixelId: "YOUR_PIXEL_ID",
accessToken: "YOUR_CAPI_ACCESS_TOKEN",
},
},
],
});
  • Meta Pixel — client-side event tracking via fbq()
  • Conversions API (CAPI) — server-side event delivery for improved signal quality
  • Event deduplication — shared event_id between Pixel and CAPI prevents double-counting
  • Standard events — default mapping to Meta’s standard event names
  • Advanced matching — optional hashed PII (email, phone) for better attribution
  • Consent: marketing — requires marketing consent before sending
Junction EventMeta Event
page:viewedPageView
product:viewedViewContent
product:addedAddToCart
order:completedPurchase