A TypeScript monorepo for integrating the Meta (Facebook) Pixel into JavaScript, Nuxt, and React applications.
| Package | Downloads | Description |
|---|---|---|
meta-pixel |
Framework-agnostic, client-side only wrapper around Meta's fbevents.js. Typed standard events, multi-pixel, GDPR consent. |
|
nuxt-meta-pixel |
Nuxt 3 & 4 module built on meta-pixel: declare pixels in config, automatic route PageView, SSR-safe. |
|
meta-pixel-react |
React bindings for meta-pixel: an SSR-safe <MetaPixelProvider>, a typed useMetaPixel() hook, and automatic route PageView. |
Each package has its own README with full usage details.
This is a Yarn workspaces monorepo (Node & Yarn versions are pinned via Volta).
yarn install
# meta-pixel — build the TypeScript wrapper
yarn workspace meta-pixel build
# nuxt-meta-pixel — run the playground / tests / lint
yarn workspace nuxt-meta-pixel dev:prepare # generate type stubs first
yarn workspace nuxt-meta-pixel dev
yarn workspace nuxt-meta-pixel test
yarn workspace nuxt-meta-pixel lint
# meta-pixel-react — build the React bindings / run tests
yarn workspace meta-pixel-react build
yarn workspace meta-pixel-react testContributions are welcome ❤️ — and if these packages help you, consider starring the repo ⭐.