This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.
This package is abandoned and no longer maintained. The author suggests using the nucleos/gdpr-bundle package instead.

This bundle provides a GDPR conform cookie information for symfony applications.

2.3.0 2021-04-19 14:50 UTC


Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

Continuous Integration Code Coverage Type Coverage

This bundle provides a GDPR conform cookie information for symfony applications.


Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require nucleos/gdpr-bundle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    Nucleos\NucleosGDPRBundle\NucleosGDPRBundle::class => ['all' => true],

Block cookies

By default all cookies are kept, also the cookie consent was not set. To block all domain cookies, you can set the following config.

# config/packages/nucleos_gdpr.yaml

    block_cookies: null

You can define a list of cookies that are kept:

# config/packages/nucleos_gdpr.yaml

          - PHPSESSID
          - ADMIN_.*

Google FLoC (Federated Learning of Cohorts)

By default a Permissions-Policy header is added to every response to respect user privacy. You can enable Google FLoC tracking via the following configuration:

# config/packages/nucleos_gdpr.yaml

        google_floc: true


It is recommended to use webpack / webpack-encore to include the GdprPopup.js and GdprPopup.css file in your page. These files are located in the assets folder.


{# template.twig #}

{{ sonata_block_render({ 'type': 'nucleos_gdpr.block.information' }, {
    'url': '',
    'text': 'Example text' // optional
}) }}


This bundle is under the MIT license.