36

Product support

Visit this product's website for support.

Categories

Small and simple plugin to cope with GDPR on your website.

This is a work in progress plugin so please be patient if everything not work perfect.

Cookies

  • Easily edit cookies groups and add JS code to be executed if the group is allowed
  • Simple Cookies bar component with optional modal popup
  • Manage cookies component to be used on GDPR pages
  • Fully translatable (with Rainlab Translate plugin)
  • Optional component output styling (Bootstrap 3 for now)
  • Import and export your prefered settings (or use default presets)
  • Option to limit scripts execution to specific pages (URLs)
Cookies groups settings

Small GDPR

Simple plugin to cope with GDPR

Installation

GitHub clone into /plugins dir:

git clone https://github.com/jan-vince/smallgdpr

OctoberCMS backend

Just look for 'Small GDPR' in search field in:

Settings > Updates & Plugins > Install plugins

Permissions

Settings > Administrators

You can set permissions to restrict access to Settings > Small plugins > Small GDPR and to messages list.

Quick start guide

Cookies

  • Install plugin.

  • Go October's settings page and click on GDPR > Cookies.

    • Go to tab Import and click button Import default settings.
    • Go to tab Cookies, add your JS code to cookies group as you need.
  • Go to CMS part of October.

    • Add new Layout (or use your existing)
    • Add component Small GDPR > Cookies bar (inside of your body tag).
  • Go to CMS part of October.

    • Add new Page with URL /gdpr
    • Add component Small GDPR > Manage cookies (inside any of your tags)

Do not forget to add {% scripts %} tag to your layout page just before closing body tag! More info in October docs.

  • Open your website - cookies bar should be visible :)

Settings

Tab: Cookies groups

The main idea is to create groups of cookies with JS scripts that you want to run on your website.

Required

When turned on users cannot disable these groups in Manage cookies component and scripts will be always executed.

Default enabled

Scripts in these groups will run without explicit user concent but can be disabled by user (in Manage cookies component).

Be careful not to violate your local laws!

Scripts

You can add one or more scripts to selected group

Custom JS code or files

You can add your own JS code and/or files to be executed when a cookies group is allowed (or required).

You can optionally limit scripts execution to production mode.

Run only in production

Script wil be executed only in production environment.

Disable

This scripts will never be executed

Run on specific pages

You can limit scripts execution to specific pages URLs.

Tab: Cookies bar

You can edit title and content of cookies bar.

If you want, you can allow default CSS styles.

Buttons

You can add one or more buttons to your cookies bar.

Allow all cookies

When turned on, click on this button will set all cookies groups enabled.

Usefull for "Allow all" button on Cookies bar.

Note: Users can change cookies settings later on CMS page with Manage cookies component (like /gdpr) if you create one.

Open modal window

When turned on, click on this button open modal window with list of cookies group.

Currently supported only for Boostrap 3 UI style (can be set on tab Settings).

Tab: Manage cookies

Just add title and content and those will be shown above cookies groups listing in Manage cookies component.

Tab: Settings

Few general settings to be set.

Cookies expiration

Number of days for cookies to live in browser.

UI style

Change formating of output HTML code.

Tab: Import

You can import settings presets from Media your own path or default plugin preset (if you leave all empty).

You have to use YAML format.

Note: Try Export first to get idea of an import file structure.

Tab: Export

You can export current settings data to configuration file and use it as a backup or template for other sites.

Components

Cookies bar

Should be used in your Layouts or Pages.

Hide Cookies bar

If you need to hide Cookies bar on specific Page or Layout, you can use View Bag on your Page this way:

[viewBag]
hideCookiesBar = 1

Manage cookies

Put this component to your page with details about privacy (like /gdpr or /cookies).

Manage cookies component can be also added as a snippet to Static Page

Users will be able to change cookies settings.

HOWTO

With component Cookies bar or Manage cookies you can access cookies settings in your Twig code like this:

{% if sgCookies.necessary %}
 ...
{% endif %}

My thanks goes to:
OctoberCMS team members and supporters for this great system.
Brooke Cagle for her photo.
Font Awesome for nice icons. OFFLINE for inspiration from his GDPR plugin

Created by Jan Vince, freelance web designer from Czech Republic.

  • Found the plugin useful on 16 Jul, 2020

    It's already a must have plugin! The ability to manage cookies' categories independently is such a great feature.

    Working on an implementation using TailwindCSS, I was afraid about the support but really well-surprised of the good design of the code (at least the components partial, didn't look yet the PHP code :) ).

    I will share my TwCSS implementation in this comment in few days for those who want.

    Thanks Jan Vince for the work!

  • author

    Replied on 17 Jul, 2020

    Thank you :)

    Best regards,

    Jan

1.7.1

Fixed HTML attributes field localization in Settings

Nov 24, 2020

1.7.0

Added option to specify pages to run scripts on

Nov 19, 2020

1.6.0

Changed settings for import (added second btn for import default settings)

Nov 19, 2020

1.5.1

Changed buttons HTML attributes field to prevent naming collision

Nov 03, 2020

1.5.0

Added Twig support for Translate plugin (thanks evwerkz)

Aug 07, 2020

1.4.11

Fixed localization

Aug 05, 2020

1.4.10

Moved modal help-block div from label tag (to be HTML5 valid)

Jul 31, 2020

1.4.9

Fixed CookiesSettings model

Jun 29, 2020

1.4.8

Added sgCookies to Cookies Manage component (for case when you do not want to use Cookies Bar in your layout or page)

Jun 27, 2020

1.4.7

Fixed components file name case

Jun 25, 2020

1.4.6

Updated translation and docs.

Jun 23, 2020

1.4.5

!!! Cookies JS code placed in code window now requires <script> tags to be present! Please check your code.

Jun 23, 2020

1.4.4

Fixed folders and models name case

Jun 23, 2020

1.4.3

Fixed migration not working on new installs

Jun 23, 2020

1.4.2

Removed forgotten dump

Jun 23, 2020

1.4.1

Extended import tab to be able to use Media, own path or default preset file

Jun 23, 2020

1.4.0

Added option do have more scripts and files in scripts group (old scripts data are automatically migrated to the new structure)

Jun 23, 2020

1.3.2

Fixed import function

Jun 22, 2020

1.3.1

Import file can be now selected from Media panel

Jun 22, 2020

1.3.0

Added export settings function

Jun 22, 2020

1.2.7

Changed fields order in form

Jun 22, 2020

1.2.6

Added option to run JS only in production mode

Jun 22, 2020

1.2.5

Updated styling, removed unnecessary styles

Jun 22, 2020

1.2.4

Added optional cookies group script file to be executed

Jun 21, 2020

1.2.3

Updated hideCookiesBar check to support Static Pages

Jun 21, 2020

1.2.2

Added option to hide Cookies bar on specific Page or Layout with View Bag property

Jun 21, 2020

1.2.1

Fixed values checks in CookiesSettings

Jun 21, 2020

1.2.0

Added Default enabled option for cookies groups for cookies to be executed without explicit consent

Jun 21, 2020

1.1.9

Removed unnecessary line in Manage cookies component

Jun 21, 2020

1.1.8

Added Static Pages snippet for Cookies manage component

Jun 20, 2020

1.1.7

Removed option Default active

Jun 20, 2020

1.1.6

Fixed default active cookies group to be active even without explicit consent

Jun 20, 2020

1.1.5

Fixed default EN preset

Jun 20, 2020

1.1.4

Fixed sgCookies array

Jun 20, 2020

1.1.3

Fixed scripts

Jun 20, 2020

1.1.2

Fixed sgCookies array to reflect required cookies group state

Jun 20, 2020

1.1.1

Updated default presets and README

Jun 20, 2020

1.1.0

Added settings in modal window

Jun 20, 2020

1.0.0

First version of Small GDPR

Jun 19, 2020