Integrate Facebook Pixel and Fb Pixel Events in GatsbyJs

Gatsby-Plugin-Facebook-Pixel
Facebook Pixel Event in Gatsby

Problem Statement

npm i gatsby-plugin-facebook-pixel
// In your gatsby-config.js 
plugins: [
{
resolve: `gatsby-plugin-facebook-pixel`,
options: {
pixelId: "pixel id here",
},
}
];

Adding facebook pixel events

Facebook event tracking

fbq('track', 'Purchase', {currency: "USD", value: 30.00});
fqb is not defined
if (typeof window !== "undefined") {
if (window.fbq != null) {
window.fbq('track', 'Lead', {currency: "USD", value: 9.99});
}
}

Learning nd Developing.