New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@chiiya/haven

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chiiya/haven

GDPR-ready cookie consent manager with type definitions and zero dependencies

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77
decreased by-32.46%
Maintainers
1
Weekly downloads
 
Created
Source
Haven

GDPR-ready cookie consent manager with zero dependencies.


Overview

Haven is a simple-to-use cookie consent manager enabling GDPR and ePrivacy compliance with just a few lines of code. Haven comes with the following features included out of the box:

Feature
📣Cookie notification for opt-in and opt-out strategies.
🔧Cookie preferences enabling users to revoke or change their consent at any time.
📥Automatic injection of services (google-analytics, google-tag-manager, facebook-pixel or any custom solution) at runtime, after the user has given their consent.
🗑️Removal of all tracking cookies after a user has revoked their consent.
📙Translations for multiple languages with easy customization.
🎨Use one of the available themes or bring your own components.
🤖Written in TS, and as such compatible with ES5, ES6+ and TS projects out of the box.

:package: Installation

npm i @chiiya/haven -S

or

yarn add 

Example

The following code snippet shows how easy it is to get started with Haven.

<script>
    Haven.create({
        services: [
            {
                name: 'google-analytics',
                id: 'UA-XXXXXXXX-1',
                purposes: ['analytics'],
                inject: true,
            }
        ]
    })
</script>

And in your privacy policy:

<div id="cookie-preferences"></div>

With that, users will get a cookie notification asking for their consent. Google Analytics will only be loaded once this consent has been given. Users may revoke their consent at any time by using the settings injected into your privacy policy page. Upon consent revoke, all tracking cookies set by Google Analytics will be removed.

FAQs

Package last updated on 04 Nov 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc