Gatsby.js plugin to add the cookiehub GDPR compliance widget. Based on the gatsby-plugin-tag.
Get an account on Cookiehub
npm install --save gatsby-plugin-cookiehub
or
yarn add gatsby-plugin-cookiehub
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-cookiehub`,
options: {
// your cookiehub widget ID
cookihubId: `YYYYYYY`,
// your google analytics tracking id
trackingId: `UA-XXXXXXXX-X`,
// Puts tracking script in the head instead of the body
head: false,
// enable ip anonymization
anonymize: true,
},
},
],
}
Puts tracking script in the head instead of the body. Default is false (render in the body)
Adds anonymize_ip
flag when calling gtag
. More info
here.
MIT