See what's launched

The next gen Gatsby is here Performance, developer velocity, and scaling to meet Enterprise needs - See what’s launched

Sign Up for Free
Community Plugin
View plugin on GitHub

Gatsby Plugin for Analytics

Gatsby plugin that combined logic of Google Analytics and Facebook Pixel in single plugin.


npm i @simpozio/gatsby-plugin-analytics


Install plugin package from npm and add plugin configuration to your gatsby-config.js file

/* gatsby-config.js */
module.exports = {
  plugins: [
      resolve: '@simpozio/gatsby-plugin-analytics',
      options: {
        head: true,
        fbq: {
          pixelId: 'your Facebook pixel id',
          disablePushState: true,
          trackViewContent: false,
          trackPageView: false
        gtag: {
          trackingIds: ['your Google Analytics id', 'your Google Ads id', 'your Marketing Platform id'],
          trackPageView: false,


  • head: boolean - if true include script tags into head, else add them to the body
  • fbq: object - configuration for Facebook Pixel, includes next properties:
    • pixelId: number - your Facebook Pixel ID
    • disablePushState: boolean - enable/disable PageView tracking on History updates
    • trackViewContent: boolean - enable/disable tracking of ViewContent event on every route update
    • trackPageView: boolean - enable/disable default PageView tracking
  • gtag: object - configuration for Google gtag.js, includes next properties:
    • trackingIds: string[] - array of tracking ID’s of Google Services fits pattern - [‘your Google Analytics id’, ‘your Google Ads id’, ‘your Marketing Platform id’]
    • trackPageView: boolean - enable/disable default PageView tracking


See simpozio-frontend-common library

© 2022 Gatsby, Inc.