PHPackages                             offline/oc-gdpr-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. offline/oc-gdpr-plugin

ActiveOctober-plugin[Utility &amp; Helpers](/categories/utility)

offline/oc-gdpr-plugin
======================

October CMS plugin to make websites GDPR and ePrivacy compliant

v2.2.30(10mo ago)373.2k201MITHTML

Since Jul 24Pushed 10mo ago7 watchersCompare

[ Source](https://github.com/OFFLINE-GmbH/oc-gdpr-plugin)[ Packagist](https://packagist.org/packages/offline/oc-gdpr-plugin)[ RSS](/packages/offline-oc-gdpr-plugin/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (7)DependenciesVersions (53)Used By (1)

oc-gdpr-plugin
==============

[](#oc-gdpr-plugin)

October CMS plugin to make websites GDPR compliant.

This plugin is available on the October Marketplace:

Features
--------

[](#features)

- [Cookie Consent Manager](#cookie-consent-manager)
- [Data retention](#data-retention)

Cookie Consent Manager
----------------------

[](#cookie-consent-manager)

This plugin provides two simple components to make your October installation GDPR compliant.

[![cookie-manager](https://user-images.githubusercontent.com/8600029/41364223-5c58a548-6f36-11e8-9279-2e04217fe645.gif)](https://user-images.githubusercontent.com/8600029/41364223-5c58a548-6f36-11e8-9279-2e04217fe645.gif)

### Quick start

[](#quick-start)

1. Define your cookie groups and cookies via the backend settings page. You can also import a example preset by running `php artisan gdpr:import`
2. Place the `cookieManager` component on a `cookies.htm` page
3. Place the `cookieBanner` component on all of your layouts. Use the configuration listed below.

```
[cookieBanner]
include_css = 1
update_partial = "gdpr"
update_selector = "#gdpr-reload"
cookie_manager_page = "cookies"
==
{% component 'cookieBanner' %}
```

1. Create a new `gdpr.htm` partial. Include the partial in your layouts as shown below. Note the `#gdpr-reload`wrapper.

```

    {% partial 'gdpr' %}

```

1. Inside your `gdpr.htm` partial you can now conditionally include your dependencies by querying the cookie's `code`.

```
{% if gdprCookieAllowed('google-analytics') %}

{% endif %}
```

### Cookie manager

[](#cookie-manager)

The `cookieManager` component gives a visitor more control over the cookies your site is using.

This component can simply be placed on a page and needs no further configuration.

```
title = "Cookies"
url = "/cookies"
layout = "default"
is_hidden = 0

[cookieManager]
==
{% component 'cookieManager' %}
```

#### Cookie presets

[](#cookie-presets)

It is possible to define your cookie groups and cookies in a `yaml` file and import them using the `gdpr:import` console command. This allows you to define cookies once and re-use them between installations.

```
php artisan gdpr:import --path=plugins/offline/gdpr/assets/presets/example_en.yaml --replace

```

You can find example definitions in the [`assets/presets`](./assets/presets) directory of this plugin.

You can optionally use the `--replace` flag to remove all existing cookie data and replace it with your preset.

If no path is specified, the plugin will load all presets from the configured `presets_path` and ask you which preset to import.

You can change the path where presets are loaded from by changing the `offline.gdpr::config.presets_path` config entry. To do this, create the file `config/offline/gdpr/config.php` and return your custom path:

```
