Skip to content

Repository files navigation

Meta Pixel

License GitHub stars

A TypeScript monorepo for integrating the Meta (Facebook) Pixel into JavaScript, Nuxt, and React applications.

Packages

Package Downloads Description
meta-pixel downloads Framework-agnostic, client-side only wrapper around Meta's fbevents.js. Typed standard events, multi-pixel, GDPR consent.
nuxt-meta-pixel downloads Nuxt 3 & 4 module built on meta-pixel: declare pixels in config, automatic route PageView, SSR-safe.
meta-pixel-react downloads 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.

Development

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 test

Contributions are welcome ❤️ — and if these packages help you, consider starring the repo ⭐.

License

MIT © tanukijs

About

Easily integrate Meta (Facebook) Pixels in JavaScript & Nuxt 3 apps. Fully typed events, multiple pixels, automatic route-based PageView, and GDPR consent. Includes the meta-pixel core wrapper and the nuxt-meta-pixel module.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages