Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
gatsby-plugin-cookiehub-banner
Advanced tools
Readme
Gatsby plugin to use cookie banner generated with cookiehub.
This plugin works in an easy way together with a plugin to add google analytics GDPR compliant: gatsby-plugin-google-analytics-gdpr
CookieHub v1 which is being phased out. Version 1 is currently sunsetting and will be shut down in May 2021 (EOL plan).
npm install --save gatsby-plugin-cookiehub-banner
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-cookiehub-banner`,
options: {
// The ID is part of the CookieHub URL: https://cookiehub.net/cc/YOUR_COOKIEHUB_ID.js
cookieHubId: "YOUR_COOKIEHUB_BANNER_ID",
// Optional parameter (default false) - Use new v2 API.
cookieHubV2Api: false
// Categories configured with CookieHub
categories: [
{
categoryName: 'analytics', // Unique id of the category which is set by Cookiehub.
cookieName: 'gatsby-plugin-google-analytics-gdpr_cookies-enabled' // Your custom cookie name
},
{
categoryName: 'marketing',
cookieName: 'marketing-enabled'
}
]
}
},
],
}
The plugin embeds the script generated by CookieHub to show the cookie banner.
On CookieHub initialization and on user input the plugin sets one cookie per category. Depending on the user input the value should be true
or false
.
You can configure your categories in the gatsby-config.js
with the according cookie names.
Cookie Handling Example:
If you want to integrate Google Analytics, you can start tracking as soon as the analytics cookie is set to true
and disable tracking if the user withdraws the choice.
There is a GDPR plugin to use Google Analytics in an easy way with this plugin: gatsby-plugin-google-analytics-gdpr. Install and configure the gatsby-plugin-google-analytics-gdpr
plugin and set the analytics category cookie name to gatsby-plugin-google-analytics-gdpr_cookies-enabled
.
cookieHubId
The ID is part of the CookieHub URL: https://cookiehub.net/cc/YOUR_COOKIEHUB_ID.js
cookieHubV2Api
Optional parameter (default false). If true the plugin uses the new Cookiehub API v2.
categories
Define your categories configured with CookieHub. A category consists of categoryName
and cookieName
.
categoryName
Unique id of the category which you can set in CookieHub categories.
cookieName
Define a custom cookie name. If none cookieName is given, the plugin will generate one.
FAQs
Gatsby plugin to use cookie banner generated with cookiehub: https://www.cookiehub.com/
The npm package gatsby-plugin-cookiehub-banner receives a total of 37 weekly downloads. As such, gatsby-plugin-cookiehub-banner popularity was classified as not popular.
We found that gatsby-plugin-cookiehub-banner demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.