# facebook-pixel-event-injection

> Simple Facebook Pixel Injection

Latest version **0.1.0** (published 2020-07-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install facebook-pixel-event-injection
pnpm add facebook-pixel-event-injection
yarn add facebook-pixel-event-injection
bun add facebook-pixel-event-injection
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2020-07-23 |
| First published | 2020-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Placedv |
| Maintainers | placedv |
| Keywords | facebook, business, manager, placedv, npm, package, reactjs |

## Links

- npm: https://www.npmjs.com/package/facebook-pixel-event-injection
- npm.io page: https://npm.io/package/facebook-pixel-event-injection

## Recent versions

- 0.1.0 (latest) — 2020-07-23
- 0.0.9 — 2020-07-23
- 0.0.8 — 2020-07-23
- 0.0.7 — 2020-07-23
- 0.0.6 — 2020-07-23
- 0.0.5 — 2020-07-23
- 0.0.4 — 2020-07-23
- 0.0.3 — 2020-07-23
- 0.0.2 — 2020-07-23

## README

# Facebook Pixel Injection
Simple Facebook Pixel Injection.
```
pixel_id    --> string (required)
event       --> string (required)
```

## Install
### Install via npm
```
$ npm i facebook-pixel-event-injection
```
### Install via CDN
```
<script src="https://placedv-npm.s3-eu-west-1.amazonaws.com/facebook_pixel_event_injection/index.js"></script>
```

## Simple Usage
To make it work properly, it must have only one event in the declaration function.

```js
import facebook from 'facebook-pixel-event-injection'

// PageView example
facebook('691662573424231', {
    track: 'PageView'
});

// Lead example
facebook('691662573424231', {
    track: 'Lead'
});

// Custom Event
facebook('607791573487795', {
    track: 'PageView',
    trackCustom: 'ShareDiscount'
});
```

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