Download the PHP package janvince/smallgdpr-plugin without Composer

On this page you can find all versions of the php package janvince/smallgdpr-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smallgdpr-plugin

Small GDPR

Cookie consent bar for October CMS with native Google Consent Mode v2.

Version 2 is a major rewrite: the plugin now owns the Consent Mode plumbing. You map cookie groups to Google consent types and the plugin emits the gtag('consent', 'update', …) signal and a dataLayer event on every page load and consent change — no pasted gtag/GTM snippets needed for the common case.

Upgrading from 1.x? v2.0 is a conscious major upgrade (bump the version in composer.json). A migration moves your data to the new schema automatically (it guesses consent_types from group slugs and copies your button labels). The Bootstrap dependency and the old style presets are gone — there is now a single floating-pill bar and a native <dialog> settings window, themable via CSS custom properties.

Installation

GitHub — clone into the /plugins dir:

October backend — search for Small GDPR in:

Settings → Updates & Plugins → Install plugins

Quick start

  1. Settings → Small GDPR → Settings → Import → Import default settings.
  2. Settings → Small GDPR → Cookies → Integration:
    • Tag type = Google Analytics 4 or Google Tag Manager
    • Tag ID = G-XXXXXXX (GA4) or GTM-XXXXXXX (GTM)
  3. Add the two components to your layout — both are required:

⚠️ cookiesConfig must live in <head>. It sets the Consent Mode default and loads the GA4/GTM tag, and that has to happen before any tag fires. Put it as high in <head> as possible (ideally first). Without it the bar still renders, but no tags are loaded and consent is never applied.

  1. (Optional) create a /gdpr page and drop in the Manage cookies component (or its page snippet) so visitors can change their choice later.

That's it — no need to paste GA4/GTM code anywhere. The plugin renders the loader, the consent default, the consent update and the dataLayer event for you.

How it works

Settings

Tab: Cookies

Integration

Cookies groups — one group per cookie category (Necessary, Statistical, Marketing, …):

Custom code — raw <head> / <body> code injected after the plugin block, for tags the plugin does not load directly (Meta, LinkedIn, Hotjar, …).

Tab: Cookies bar

Title, content, page-reload toggle, and the button labels / visibility (Accept, Reject, Settings, Save).

Tab: Manage cookies

Title and content shown above the cookie list in the Manage cookies component / dialog.

Tab: Settings

Components

cookiesConfig

Place inside <head>, as high as possible. Renders the Consent Mode init and the tag loader.

cookiesBar

Place right after <body>. Renders the bar and the settings dialog.

Hide the bar on a specific page/layout via the View Bag:

cookiesManage

Put on a privacy page (e.g. /gdpr) so visitors can change their choice. Also available as a Static Pages snippet.

JavaScript API

A global SmallGDPR object is available:

Listen for changes:

Twig

With the cookiesBar or cookiesManage component on the page you can read the consent state in Twig:

Theming

The bar and dialog are styled with CSS custom properties — override them in your own stylesheet (no Bootstrap required):


Thanks to the October CMS team and to OFFLINE for inspiration from their GDPR plugin.

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


All versions of smallgdpr-plugin with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ^1.0 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package janvince/smallgdpr-plugin contains the following files

Loading the files please wait ...