Skip to content

A Gatsby plugin to easily add a Facebook Pixel embed code to your site.

License

Notifications You must be signed in to change notification settings

hutsoninc/gatsby-plugin-facebook-pixel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@hutsoninc/gatsby-plugin-facebook-pixel

Current npm package version

Gatsby plugin to add a Facebook Pixel to your site.

Installation

npm install --save @hutsoninc/gatsby-plugin-facebook-pixel

Usage

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: '@hutsoninc/gatsby-plugin-facebook-pixel',
      options: {
          pixelId: 'YOUR_PIXEL_ID',
      },
    },
  ]
}

fbq function

This plugin provides a fbq function to prevent SSR issues.

To use it, simply import it and use it like the normal fbq function.

import { fbq } from '@hutsoninc/gatsby-plugin-facebook-pixel'

fbq('track', 'Contact')

License

MIT © Hutson Inc

About

A Gatsby plugin to easily add a Facebook Pixel embed code to your site.

Resources

License

Stars

Watchers

Forks

Packages

No packages published