page-8 / total-cookie-consent
The plugin provides total control over the cookie consent collection process and includes three consent collection options: No Consent, Implied Consent, and Explicit Consent. Collection methods can be tailored per country or state to provide an optimal non-intrusive user experience.
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
Requires (Dev)
- codeception/codeception: ^3.0
- craftcms/cms: ^3.2.0
- vlucas/phpdotenv: ^3.0
README
The plugin provides total control over the cookie consent collection process and includes three consent collection options: No Consent, Implied Consent, and Explicit Consent. Collection methods can be tailored per country or state to provide an optimal non-intrusive user experience.
Requirements
This plugin requires Craft CMS 3.0.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require pageworks/total-cookie-consent
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Total Cookie Consent.
Usage
Add the following twig to your project base template to begin using the plugin.
{% hook 'total-cookie-consent' %} {% set consent = craft.tcc.consent() %} {% if consent['statistics'] %} {# statistics code #} {% endif %} {% if consent['marketing'] %} {# marketing code #} {% endif %} {% if consent['necessary'] %} {# necessary code #} {% endif %}