facebook-tracking-pixel
v1.0.1
Published
> React JS wrapper for [Facebook's Pixel](https://developers.facebook.com/docs/facebook-pixel)
Downloads
1
Maintainers
Readme
Facebook Tracking Pixel
React JS wrapper for Facebook's Pixel
Install
npm install --save facebook-tracking-pixel
or
yarn add facebook-tracking-pixel
How to use
import { initialize } from 'facebook-tracking-pixel';
initialize('yourPixelIdGoesHere');
track('event');For tracking default events. More info about standard events: https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#standard-events
trackCustom(event, data); // For tracking custom events. More info about custom events: https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#custom-events
trackSingle(pixelId, trackType, options); // For tracking single events. More info about trackSingle events: https://developers.facebook.com/ads/blog/post/v2/2017/11/28/event-tracking-with-multiple-pixels-tracksingle