Skip to content

Gatsby.js plugin to add the cookiehub GDPR compliance widget

License

Notifications You must be signed in to change notification settings

100Shapes/gatsby-plugin-cookiehub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-plugin-cookiehub

Gatsby.js plugin to add the cookiehub GDPR compliance widget. Based on the gatsby-plugin-tag.

Setup

Get an account on Cookiehub

Install

npm install --save gatsby-plugin-cookiehub

or

yarn add gatsby-plugin-cookiehub

Use

// 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,        
      },
    },
  ],
}

Options

head

Puts tracking script in the head instead of the body. Default is false (render in the body)

anonymize

Adds anonymize_ip flag when calling gtag. More info here.

License

MIT

Releases

No releases published

Packages

No packages published