-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tagconcierge/feature/gtm-consent-mode
Revamp for simple GTM consent mode
- Loading branch information
Showing
27 changed files
with
598 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,32 @@ | ||
WORDPRESS_DB_HOST=mariadb | ||
WORDPRESS_DB_USER=root | ||
WORDPRESS_VERSION=latest | ||
# To test on specific PHP version: | ||
# WORDPRESS_VERSION=6.0.0-php8.0-apache | ||
|
||
WORDPRESS_LOCALE=en_US | ||
|
||
MYSQL_DATABASE=database | ||
MYSQL_USER=user | ||
MYSQL_PASSWORD=password | ||
MYSQL_ROOT_PASSWORD=test | ||
|
||
DB_HOST=mysql | ||
DB_CHARSET= | ||
DB_COLLATE= | ||
TABLE_PREFIX=wp_ | ||
|
||
WP_DEBUG=true | ||
WP_DEBUG_LOG= | ||
WP_CACHE= | ||
WPCACHEHOME= | ||
UPLOADS= | ||
|
||
FS_METHOD= | ||
DISABLE_WP_CRON= | ||
DISALLOW_FILE_EDIT= | ||
TAR_OPTIONS=--no-same-owner | ||
TAG_CONCIERGE_API_URL=https://beta-api.tagconcierge.com | ||
|
||
WORDPRESS_DB_NAME=database | ||
WORDPRESS_DB_USER=user | ||
WORDPRESS_DB_PASSWORD=password | ||
WORDPRESS_DB_NAME=wordpress | ||
WORDPRESS_DB_HOST=mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/.env | ||
/dist | ||
/vendor/ | ||
.wordpress_data |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,64 @@ | ||
version: '2' | ||
# dockerpresso 2.1.0 | ||
services: | ||
wordpress: | ||
image: wordpress:latest | ||
web: | ||
image: wordpress:$WORDPRESS_VERSION | ||
env_file: .env | ||
restart: always | ||
volumes: | ||
- ./.docker/wordpress:/var/www/html/ | ||
- .:/var/www/html/wp-content/plugins/gtm-cookies-free | ||
- ./.wordpress_data:/var/www/html/ | ||
# uncomment line below to start theme development | ||
# directory below should contain theme style.css file | ||
# - ./example-theme-src:/var/www/html/wp-content/themes/example-theme | ||
# uncomment line below to start plugin development | ||
# directory below should contain main plugin PHP file | ||
- .:/var/www/html/wp-content/plugins/gtm-consent-mode-banner | ||
ports: | ||
- "80:80" | ||
links: | ||
- mariadb | ||
mariadb: | ||
container_name: mariadb | ||
image: mariadb:10.3 | ||
volumes: | ||
- ./.docker/mariadb:/var/lib/mysql | ||
- mysql | ||
mysql: | ||
image: mysql | ||
restart: always | ||
env_file: .env | ||
environment: | ||
MYSQL_DATABASE: wordpress | ||
MYSQL_ROOT_PASSWORD: password | ||
- MYSQL_DATABASE=${WORDPRESS_DB_NAME} | ||
- MYSQL_USER=${WORDPRESS_DB_USER} | ||
- MYSQL_PASSWORD=${WORDPRESS_DB_PASSWORD} | ||
ports: | ||
- "3306:3306" | ||
cli: | ||
volumes: | ||
- mysql_data:/var/lib/mysql | ||
web-cli: | ||
profiles: ['cli'] | ||
image: wordpress:cli | ||
env_file: .env | ||
command: bash | ||
volumes: | ||
- ./docker/wordpress:/var/www/html/ | ||
user: "33:33" | ||
env_file: .env | ||
volumes_from: | ||
- web | ||
links: | ||
- web | ||
- mysql | ||
mysql-cli: | ||
profiles: ['cli'] | ||
image: mysql | ||
env_file: .env | ||
links: | ||
- mysql:mysql | ||
command: bash -c 'exec mysql -hmysql -uroot -p$$MYSQL_ROOT_PASSWORD $$MYSQL_DATABASE' | ||
environment: | ||
- MYSQL_DATABASE=${WORDPRESS_DB_NAME} | ||
- MYSQL_USER=${WORDPRESS_DB_USER} | ||
- MYSQL_PASSWORD=${WORDPRESS_DB_PASSWORD} | ||
volumes_from: | ||
- mysql | ||
php-cli: | ||
image: mfrankiewicz/php:7.1-cli | ||
working_dir: /var/www | ||
entrypoint: bash | ||
profiles: ['cli'] | ||
image: composer | ||
env_file: .env | ||
command: bash | ||
volumes: | ||
- ./:/var/www | ||
- .:/app | ||
volumes: | ||
mysql_data: {} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
/** | ||
* Plugin Name: GTM Consent Mode Banner | ||
* Plugin URI: https://wordpress.org/plugins/gtm-consent-mode-banner | ||
* Description: Lightweight (1.9 kB) Consent/Cookies Banner compatible with GTM Consent Mode. | ||
* Version: 1.0.0 | ||
* Author: Tag Concierge | ||
* Author URI: https://tagconcierge.com/ | ||
* License: GPLv2 or later | ||
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
* Text Domain: gtm-consent-mode-banner | ||
* Domain Path: /languages | ||
*/ | ||
|
||
use TagConcierge\GtmConsentModeBanner\GtmConsentModeBanner; | ||
|
||
require __DIR__ . '/vendor/autoload.php'; | ||
|
||
$plugin = new GtmConsentModeBanner(); | ||
$plugin->initialize(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
=== GTM Consent Mode Banner === | ||
Contributors: Tag Concierge | ||
Tags: google tag manager, consent mode, cookies banner, privacy | ||
Requires at least: 5.1.0 | ||
Tested up to: 6.2.2 | ||
Requires PHP: 7.0 | ||
Stable tag: 1.0.0 | ||
License: GPLv2 or later | ||
License URI: http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
Lightweight (1.9 kB) Consent/Cookies Banner compatible with GTM Consent Mode. | ||
|
||
== Description == | ||
|
||
GTM Consent Mode Banner is a lightweight (1.9 kB), user-friendly WordPress plugin designed to integrate Google Tag Manager Consent Mode seamlessly into your website. It offers a simple and efficient way for website owners to comply with cookie and privacy regulations like GDPR and CCPA, by enabling visitors to select their cookie preferences easily. | ||
|
||
## Features | ||
|
||
- **Simple Setup**: Integrate with Google Tag Manager with minimal configuration. | ||
- **Customizable Consent Banner**: Tailor the appearance and message of your consent banner. | ||
- **User Preference Control**: Allows users to specify their consent for different types of cookies (e.g., necessary, analytics, marketing). | ||
- **Compliance with Privacy** Laws: Helps in making your website compliant with GDPR, CCPA, and other privacy regulations. | ||
- **Lightweight and Fast**: Designed to be non-intrusive and does not affect your website's load time. | ||
|
||
|
||
== Installation == | ||
|
||
1. Upload or install `GTM Consent Mode Banner` plugin from WordPress plugins directory. | ||
2. Activate the plugin through the `Plugins` menu in WordPress. | ||
3. That's it! Consent State will be pushed to DataLayer adhering to Consent Mode API | ||
4. Use plugin settings to customise the content and consent settings. | ||
5. Optionally use plugin settings to install GTM snippets | ||
|
||
== Frequently Asked Questions == | ||
|
||
= How to inject GTM tracking snippet? = | ||
|
||
By default this plugin push consent information to the GTM DataLayer object that can be installed by other plugins or directly in the theme code. | ||
It can also embed GTM snippets, go to settings to configure it. | ||
|
||
= Do I need to configure anything in GTM to enable consent mode = | ||
|
||
Once your Consent Banner is deployed you need to review all your GTM tags to ensure they have correct consent checks settings. | ||
You can use Consent Overview screen to quickly review and update tags. [Read more here](https://docs.tagconcierge.com/article/59-how-to-configure-gtm-consent-mode) | ||
|
||
== Screenshots == | ||
|
||
1. Consent Banner in action | ||
2. Consent Banner displayed as modal | ||
3. Consent Banner displayed as bar without "wall" | ||
4. Consent Banner settings screen with all consent types listed | ||
5. Consent Banner WP Admin basic settings | ||
6. Consent Banner WP Admin banner content settings | ||
7. Consent Banner WP Admin GTM snippets settings | ||
8. Consent Banner WP Admin consent types settings | ||
|
||
|
||
== Changelog == | ||
|
||
= 1.0.0 = | ||
|
||
* Initial version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace TagConcierge\GtmConsentModeBanner; | ||
|
||
use TagConcierge\GtmConsentModeBanner\DependencyInjection\Container; | ||
|
||
class GtmConsentModeBanner | ||
{ | ||
public const SNAKE_CASE_NAMESPACE = 'gtm_consent_mode_banner'; | ||
|
||
public const SPINE_CASE_NAMESPACE = 'gtm-consent-mode-banner'; | ||
|
||
private $container; | ||
|
||
public function initialize() | ||
{ | ||
$this->container = new Container(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.