Skip to content

ckies/library

Repository files navigation

Browser Library

@ckies/library MIT License CircleCI Downloads

Approach to offer a generic tooling for GDPR-compliant cookie handling. Use @ckies/library in your JavaScript or TypeScript projects, or use it as a drop-in solution for static projects.

Mode

Per default, opt-out is used and all cookies are allowed. Set window.CKIES_OPTIN to true and all cookies but necessary ones are denied per default.

Usage

Custom Build Process

import { ckies } from '@ckies/library'

if (ckies.useMarketing()) {
  console.log('Marketing cookies are allowed!')
}

Hosted Library

<script src="ckies.min.js"></script>

<script>
  if (ckies.useMarketing()) {
    console.log('Marketing cookies are allowed!')
  }
</script>