2017-25 © Pedro Peláez
 

neos-package cookieconsent

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

image

kaufmanndigital/cookieconsent

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  • Wednesday, July 11, 2018
  • by kaufmanndigital
  • Repository
  • 2 Watchers
  • 8 Stars
  • 548 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 10 Versions
  • 174 % Grown

The README.md

KaufmannDigital.CookieConsent

A ready-to-run package, that integrates Cookie Consent into your Neos CMS site., (*1)

We have created a new package with many more functions, inline maintenance and even easier configuration. 🎉
Have a look at KaufmannDigital.GDPR.CookieConsent., (*2)

Installation

The easiest way to install is via composer:, (*3)

composer require kaufmanndigital/cookieconsent

Afterwards, you should see the Cookie Hint on your page., (*4)

To configure the policy-link, you have the following two options:, (*5)

  • Add the NodeType-Mixin KaufmannDigital.CookieConsent:PolicyPageMixin to your Home-NodeType (if you have a specific NodeType for home):, (*6)

    'Your.Package:Document.Home':
      superTypes:
        'Neos.Neos:Document': true
        'KaufmannDigital.CookieConsent:PolicyPageMixin': true
        ...
    

    After that, simply select the policy page in your Neos backend., (*7)

  • Or use this snippet in your Settings.yaml:, (*8)

    KaufmannDigital:
      CookieConsent:
        #Global configuration of PolicyPage
        policyPageNode: 'c7a91aa8-fbac-4c24-8326-102eb7307180' #UUID of global page you want to link
    
        #Configuration per site for multisite installations
        #Replace site1/site2 with your sitename (/sites/sitename/node-a2ufd/.../)
        policyPageNodes:
          site1: 'c7a91aa8-fbac-4c24-8326-102eb7307180' #UUID of policy-page for /sites/site1
          site2: '454d85b6-289b-11e9-b210-d663bd873d93' #UUID of policy-page for /sites/site2
    

Congratulations, you added Cookie Consent to your Neos CMS page. That was easy, right?, (*9)

Changing the text

The content inside Cookie Consent is managed via translations. If you want to change it, copy the Packages/Application/KaufmannDigital.CookieConsent/Resources/Private/Translations folder into your Site-Package and add this configuration to Settings.yaml:, (*10)

KaufmannDigital:
  CookieConsent:
    translations:
      package: 'Vendor.Package'
      source: 'Main'

From now, the translation from your package (in this example "Vendor.Package") will be used., (*11)

Translations for German and English are provided by this package. We are happy to get translations for your language via Pull-Request., (*12)

Changing layout & colors

You can also change colors and position. To do so, you have to add this snippet to Settings.yaml:, (*13)

KaufmannDigital:
  CookieConsent:
    position: 'bottom' # bottom, bottom-left, bottom-right, top, top-left or top-right
    theme: 'block' # block, classic, or edgeless
    layout: 'basic' # basic, basic-close or basic-header
    palette:
      popup:
        background: '#000' #like in css
        text: 'white' #like in css
      button:
        background: 'rgb(255, 0, 0)' #like in css
        text: '#fff' #like in css

You don't have to override all values. Just pick what you want to change. More configuration-options can be found at cookieconsent.insites.com, (*14)

Using Opt-In or Opt-Out

In order to use Opt-In or Opt-Out functionality, you have to activate it in Settings:, (*15)

KaufmannDigital:
  CookieConsent:
    type: 'opt-in' #Or 'opt-out' (depending on what you want to do)

Afterwards, you can listen to the kd-cookieconsent event in JavaScript to en-/disable cookies:, (*16)

document.addEventListener("kd-cookieconsent", function (e) {
    if (e.detail === 'enable-cookies') {
        //Enable your cookies here
        //For Google Analytics:
        window['ga-disable-UA-<YOUR-SITE-CODE>'] = false;
    } else if (e.detail === 'disable-cookies') {
        //Disable your cookies here
        //For Google Analytics:
        window['ga-disable-UA-<YOUR-SITE-CODE>'] = true;
    }
});

Compile JS & CSS into your own files

If you don't want this Package to include it's own JS and CSS, you can disable it with in Settings.yaml:, (*17)

KaufmannDigital:
  CookieConsent:
    includeJavaScript: false
    includeCss: false

If you do so, you have to include JS & CSS of Cookie Consent in your files. Instructions can be found here, (*18)

FAQs

  • Cookie Consent isn't shown in Backend.
    • It's a feature, not a bug ;-)

Known Bugs

Known Bugs are submitted as issue. Please have a look at it, before you supply a bug you found. You did a bugfix? Great! Please submit it as PR to share it with other users., (*19)

Planned Features

Planned functions are also created as issues and marked as such. You have another idea? Or would you like to help with the implementation? Gladly! Simply create new issues or PRs., (*20)

Maintainer

This package is maintained by Kaufmann Digital. Feel free to send us your questions or requests to support@kaufmann.digital, (*21)

License

Licensed under MIT, see LICENSE, (*22)

The Versions

11/07 2018

dev-master

9999999-dev https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

11/07 2018

1.1.6

1.1.6.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

06/06 2018

dev-feature/logging

dev-feature/logging https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

24/05 2018

1.1.5

1.1.5.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

24/05 2018

1.1.4

1.1.4.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

24/05 2018

1.1.3

1.1.3.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

09/05 2018

1.1.2

1.1.2.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

23/04 2018

1.1.1

1.1.1.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

23/04 2018

1.1.0

1.1.0.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires

 

09/04 2018

1.0.0

1.0.0.0 https://www.kaufmann.digital

A ready-to-run Neos CMS Package, that adds Cookie Consent to your Neos-Site

  Sources   Download

MIT

The Requires