18

Product support

Visit this product's website for support.

Categories

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

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 (Plain HTML, Bootstrap 3, Bootstrap 5)
  • 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 select from pre-defined 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 1 Feb, 2022

    Very good plugin, complete and easy to set up. Nice work, thanks

  • author

    Replied on 1 Feb, 2022

    Hi and thank you!

  • Found the plugin useful on 20 Mar, 2021

    This is a really useful solution for modern websites. Thanks and respect to the author.

  • author

    Replied on 20 Mar, 2021

    Thanks, i appreciate it!

    Jan

  • 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.27.0

French translation (thanks Jean-Daniel Kneubühler)

Mar 21, 2024

1.26.1

Modal reload logic updated

Mar 12, 2024

1.26.0

Updated templates for Google Consent v2

Mar 01, 2024

1.25.0

Simplified Chinese Language (thanks @ZhiweiWu0425)

Mar 01, 2024

1.24.0

Replaced jQuery with vanilla JS (thanks @anik1ng)

Dec 16, 2023

1.23.1

Fixed export settings

Nov 25, 2023

1.23.0

Added option to run JS script after Accept-all Button click

May 13, 2023

1.22.0

Strict variables fix (thanks @SamBrishes)

Mar 29, 2023

1.21.0

OC3 compatibility

Nov 09, 2022

1.20.0

Added option to pre-check cookies list items in modal window

Sep 21, 2022

1.19.1

Fixed css

Sep 21, 2022

1.19.0

Updated preset

Sep 17, 2022

1.18.2

Fixed Twig code for OC3

Sep 17, 2022

1.18.1

Fixed version yaml for OC3

May 21, 2022

1.18.0

Added Finnish language (thanks mediaclinic)

Mar 01, 2022

1.17.0

Updated default presets with Google Analytics code to run without consent with disabled storage

Feb 06, 2022

1.16.0

Added option to require cookies consent for each web site language separately

Feb 06, 2022

1.15.5

Fixed bug in Bootstrap 5 modal form template

Feb 06, 2022

1.15.4

Fixed bug in JS

Jan 18, 2022

1.15.3

Updated presets texts

Jan 16, 2022

1.15.2

Updated css for Bootstrap box UI

Jan 13, 2022

1.15.1

Fixed cookies bar buttons function

Jan 13, 2022

1.15.0

Added Reject all button onption, updated import presets

Jan 10, 2022

1.14.2

Updated css styles for topline strip in container

Sep 07, 2021

1.14.1

Fixed css styles for topline strip in container

Sep 07, 2021

1.14.0

Added option to display top strip in Bootstrap container

Sep 07, 2021

1.13.0

Updated default presets with new GA code

Sep 01, 2021

1.12.1

Fixed modal hide function

Mar 19, 2021

1.12.0

Fixed versions numbering

Mar 19, 2021

1.11.2

!!! If you edited default components markup (or you use only parts of it), please check if everything works after update. If you use plugin as is, you should be fine :)

Mar 19, 2021

1.10.2

Fixed external URL handling with cookies bar buttons

Mar 19, 2021

1.10.1

Fixed cookie lifetime function

Mar 19, 2021

1.10.0

Added Slovak translation, fixed Czech translation

Feb 01, 2021

1.9.1

Added optional Cookies bar strip CSS styles

Jan 30, 2021

1.8.1

Updated Bootstrap 5 modal support (thanks evwerkz)

Jan 04, 2021

1.8.0

Added Russian and German language (thanks evwerkz)

Dec 21, 2020

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