Install

Using NPM

Terminal window
npm install --save gatsby-plugin-snap-engage

Using Yarn

Terminal window
yarn add gatsby-plugin-snap-engage

How to use

// In your gatsby-config.js
// Simple setup
plugins: [
{
resolve: `gatsby-plugin-snap-engage`,
options: {
id: "YOUR_SNAP_ENGAGE_SCRIPT_ID",
includeInDevelopment: false,
},
},
];
// Multilingual setup
plugins: [
{
resolve: `gatsby-plugin-snap-engage`,
options: {
defaultLocale: "en",
locales: {
en: "YOUR_SNAP_ENGAGE_SCRIPT_ID_FOR_LOCALE",
fr: "YOUR_SNAP_ENGAGE_SCRIPT_ID_FOR_LOCALE",
},
includeInDevelopment: false,
},
},
];