Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
@juanlatorre/react-facebook-pixel
Advanced tools
React JS wrapper for Facebook's Pixel
npm install --save react-facebook-pixel
or
yarn add react-facebook-pixel
React Facebook Pixel is being sponsored by the following tool; please help to support us by taking a look and signing up to a free trial
import ReactPixel from 'react-facebook-pixel';
const advancedMatching = { em: 'some@email.com' }; // optional, more info: https://developers.facebook.com/docs/facebook-pixel/advanced/advanced-matching
const options = {
autoConfig: true, // set pixel's autoConfig. More info: https://developers.facebook.com/docs/facebook-pixel/advanced/
debug: false, // enable logs
};
ReactPixel.init('yourPixelIdGoesHere', advancedMatching, options);
ReactPixel.pageView(); // For tracking page view
ReactPixel.track(event, data); // For tracking default events. More info about standard events: https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#standard-events
ReactPixel.trackSingle('PixelId', event, data); // For tracking default events.
ReactPixel.trackCustom(event, data); // For tracking custom events. More info about custom events: https://developers.facebook.com/docs/facebook-pixel/implementation/conversion-tracking#custom-events
ReactPixel.trackSingleCustom('PixelId', event, data); // For tracking custom events.
if you're bundling in CI
...
componentDidMount() {
const ReactPixel = require('react-facebook-pixel');
ReactPixel.default.init('yourPixelIdGoesHere');
}
...
otherwise CI will complain there's no window
.
To be GDPR compliant, revoke the consent right after init and grant it when the user accepts to be tracked
...
ReactPixel.init('yourPixelIdGoesHere', advancedMatching, options);
ReactPixel.revokeConsent();
...
...
<button onClick={ReactPixel.grantConsent}>Accept cookies</button>.
...
npm run start
Default dev server runs at localhost:8080 in browser. You can set IP and PORT in webpack.config.dev.js
npm run bundle
FAQs
Pixel Kit for React
We found that @juanlatorre/react-facebook-pixel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.