Gatsby plugin to add etracker analytics to your site.
NPM
npm install --save gatsby-plugin-etracker-analytics
Yarn
yarn add gatsby-plugin-etracker-analytics
// In your gatsby-config.js
plugins: [
{
resolve: `gatsby-plugin-etracker-analytics`,
options: {
secureCode: `YOUR_ETRACKER_SECURE_CODE` // required
},
},
];
The plugin is configurable, here are the configs by default.
plugins: [
{
resolve: `gatsby-plugin-etracker-analytics`,
options: {
secureCode: `YOUR_ETRACKER_SECURE_CODE`, // required
// optional fields, default values
respectDnt: true,
blockCookies: true,
// If this option is enabled, tracking will only work when the cookie named `controlCookieName` is not false.
isCookieConsentEnabled: true,
controlCookieName: `cookie_control_consent`
},
},
];
MIT