Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/100shapes/gatsby-plugin-cookiehub
Gatsby.js plugin to add the cookiehub GDPR compliance widget
https://github.com/100shapes/gatsby-plugin-cookiehub
cookie-consent cookiehub gatsby-plugin gatsbyjs gdpr
Last synced: 3 months ago
JSON representation
Gatsby.js plugin to add the cookiehub GDPR compliance widget
- Host: GitHub
- URL: https://github.com/100shapes/gatsby-plugin-cookiehub
- Owner: 100Shapes
- License: mit
- Created: 2018-11-15T20:24:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T20:35:56.000Z (almost 6 years ago)
- Last Synced: 2024-09-25T00:31:44.179Z (4 months ago)
- Topics: cookie-consent, cookiehub, gatsby-plugin, gatsbyjs, gdpr
- Language: JavaScript
- Size: 4.88 KB
- Stars: 5
- Watchers: 6
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-cookiehub
Gatsby.js plugin to add the cookiehub GDPR compliance widget. Based on the [gatsby-plugin-tag](https://github.com/flpvsk/gatsby-plugin-gtag).## Setup
Get an account on [Cookiehub](https://cookiehub.com)
## Install
```bash
npm install --save gatsby-plugin-cookiehub
```
or
```bash
yarn add gatsby-plugin-cookiehub
```## Use
```js
// 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](https://developers.google.com/analytics/devguides/collection/gtagjs/ip-anonymization).## License
MIT