# react-fbq

> Package to add React Pixel Code in your project

Latest version **2.0.0** (published 2023-04-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-fbq
pnpm add react-fbq
yarn add react-fbq
bun add react-fbq
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-04-11 |
| First published | 2022-05-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 15 |
| Author | marcosmss |
| Maintainers | marcosmss |
| Keywords | react pixel code, facebook pixel code, react, fbq |

## Links

- npm: https://www.npmjs.com/package/react-fbq
- Repository: https://github.com/marcosmss/react-fbq
- Homepage: https://github.com/marcosmss/react-fbq#readme
- Issues: https://github.com/marcosmss/react-fbq/issues
- npm.io page: https://npm.io/package/react-fbq

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-04-11
- 1.0.12 — 2022-11-16
- 1.0.11 — 2022-11-14
- 1.0.10 — 2022-05-11
- 1.0.9 — 2022-05-11
- 1.0.8 — 2022-05-11

## README

# React Facebook Pixel

React Fbq is a package to help you in yours projects.

> React JS wrapper for [Facebook's Pixel](https://developers.facebook.com/docs/facebook-pixel)
## Install

```bash
npm install --save react-fbq
```

or

```bash
yarn add react-fbq
```

## How to use

```js
import ReactFbq from 'react-fbq';
const advancedMatching = { em: 'some@email.com' }; // optional, more info: https://developers.facebook.com/docs/facebook-pixel/advanced/advanced-matching

ReactFbq.initialize({ id: 'yourPixelIdGoesHere', advancedMatching: advancedMatching });
ReactFbq.pageView(); // For tracking page view
ReactFbq.track({ title: event, data: data }); // For tracking default events. More info about standard events: https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#standard-events
```

## Dev Server

In the folder `demo`

```bash
yarn install
```
```bash
yarn start
```

Default dev server runs at localhost:4000 in browser.
You can set IP and PORT in webpack.config.dev.js

---
_Source: https://npm.io/package/react-fbq · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
