Coder Social home page Coder Social logo

cybotas / cookiebotwp Goto Github PK

View Code? Open in Web Editor NEW
37.0 10.0 27.0 6.02 MB

This repository contains Addons that will make other plugins work with Cookiebot.

Home Page: https://wordpress.org/plugins/cookiebot/

License: GNU General Public License v2.0

PHP 84.55% CSS 7.92% JavaScript 6.59% Shell 0.94%

cookiebotwp's Introduction

Cookiebot CMP WordPress Plugin

Cookiebot Wordpress plugin is a plugin that make other plugins compatible with Cookiebot. The addons hook into the original plugin and render the cookie setting tags as advised by the Cookiebot guidelines at https://www.cookiebot.com/en/help/.

Concurrently we are working with WP Core on what we believe is the real solution. A framework in WP Core that can signal the consent state to other plugins, so that they can handle their cookie setting code without explicit support for Cookiebot, or other cookie plugins. If and when this will be implemented is unknown.

https://core.trac.wordpress.org/ticket/44043

Travis CI Status

Build Status

Sonarcloud status

Security Reliability Bugs Maintainability Vulnerabilities

Table of contents

Installation

Regular users should use Cookiebot WordPress plugin which includes Cookiebot Addons.

If you want the most recent changes get the latest release of the plugin and upliad it to your WP plugins folder

How do I make my plugin support Cookiebot?

See the Cookiebot API readme for more details about the Cookiebot API

See How to block cookies

See How to add new addon

See Admin UI

Roadmap

Following plugins have native (built-in) support for Cookiebot:

Released and tested addons:

Following addons are in pipeline:

  • To be continued..

If you have a plugin that you would like integration for, please submit a request in the Issues section.

Contributions

Everyone is welcome to make a pull request with new addon support, or to fix existing addons.

Shout out to

@fschaeffler - HubSpot Tracking Code

@irondan - AddToAny

@Jursdotme - Custom Facebook Feed from Smashballoon

@MarcZijderveld - Popups by OptinMonster

Way to go!

Need to get in touch?

There are several ways you can get in touch with us.
We are available on GitHub and WordPress.org
You can also reach us through our helpdesk at www.cookiebot.com/en/helpdesk/

cookiebotwp's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cookiebotwp's Issues

Fatal Error: after update to 2.0.1

Server: Nginx
PHP: 7.1
Redis/Object cache
Error:
Fatal error: Uncaught Error: Class 'cookiebot_addons\config\Script_Config' not found in /data/s99137/dom21223/dom21223/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php:102 Stack trace: #0 /data/s99137/dom21223/dom21223/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(172): cookiebot_addons\Cookiebot_Addons->__construct() #1 /data/s99137/dom21223/dom21223/wp-content/plugins/cookiebot/cookiebot.php(90): include_once('/data/s99137/do...') #2 /data/s99137/dom21223/wordpress-4.9.6/wp-includes/class-wp-hook.php(286): Cookiebot_WP->cookiebot_init('') #3 /data/s99137/dom21223/wordpress-4.9.6/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #4 /data/s99137/dom21223/wordpress-4.9.6/wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /data/s99137/dom21223/wordpress-4.9.6/wp-settings.php(327): do_action('plugins_loaded') #6 phar:///usr/local/wp-cli/wp-cli-1.5.0.phar/php/WP_CLI/Runner.php(1174): require('/data/s99137/do...') #7 phar:///usr/local/wp-cli/wp-cli-1.5.0.phar/php/WP_CLI in /data/s99137/dom21223/dom21223/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php on line 102

"I don't use the Cookiebot WP plugin" checkbox

The addons should work if the user is using GTM or some other tag Manager, rather than the Cookiebot WP plugin.

We need to create a checkbox with the text: "I don't use the Cookiebot WP plugin", so that we do not check if the Cookiebot WP plugin is installed, before addons are executed.

The checkbox could be un-checked on installation, if we detect that Cookiebot WP is installed. Otherwise checked.

Remember to add a description to a possible scenario when someone would use this.

Watch on "XYZ" platform.

Hi there,

A little feature request if possible to make the plugin more beautiful.

In stead of only displaying the Placeholder text, add an option to click a link and watch it on the external platform.
927ca9fff35e5de0cbbc3ca4433950fb8b620fe7_1_668x500

The image is pure an example of the watch on XYZ.

Greetz,

Jaime

AddToAny Share Buttons

General

URL Plugin: https://wordpress.org/plugins/add-to-any/
# installs: 500,000+
Last updated: 3 weeks ago

Comment

Script to create Share buttons on a site.

Seems to have a hook to disable script output; just needs to be implemented. From add-to-any.php, line 727:

function A2A_SHARE_SAVE_head_script() {
	// Hook to disable script output
	// Example: add_filter( 'addtoany_script_disabled', '__return_true' );
...

Widget for Cookie Declaration

It would be nice with a widget as an alternative to the shortcode.
This would ease the implementation of the cookie declaration in widget based pagebuilders like Beaverbuilder, Elementor, Siteorigin etc.

I could take it on if it would help.

Addon description below title

The current autocorrection of youtube, vimeo etc videos is named "Embed autocorrect". The average WP user may not know what this means. It should be possible to add a description to the addon, which should go under the title. This can be done with an extra function in the interface.

See attached image.

image

Move Cookiebot Addons to main Cookiebot plugin

After some discussions back and forth with prominent WP forum and plugin reviewers, we've been advised to put the addons inside the Cookiebot plugin, instead of having two seperate plugins.

Cookiebot Addons will still be maintained in this repo, however, they will be published inside the Cookiebot plugin and not standalone.

Add auto-update

Add a checkbox for auto-update of the plugin.
Should be pre-checked

Cookie notification not consistently placed near widgets

Not sure if this is configurable somewhere, but it wasn't immediately obvious to me.

I noticed that the notifications for what cookies to accept are not showing up consistently near widgets.

For example, the notice appears below the Twitter widget
twitter

But above the G+ widget
gplus

Cookiebot settings button

Hello,
Is there a way to have a button always on bottom right for example for someone who would like to recheck which of the cookies will have activated?
It is a bit strange in my opinion not to have this option.

Best regards

Integration test : get_plugin_file should exist on SVN

Create a unit test for each addon that goes to the plugins public SVN, and verifies that the get_plugin_file exists.

The build will fail if an addon suddenly changes name.

Idea:

Add a method on the addon interface, that returns the svn URL for the addon
Use that URL in conjunction with the file path in the unit test

Grammar and Spelling

Under Settings --> Cookiebot Addons --> Available plugins:

Below is a list of addons for Cookiebot. Addons help you making contributed plugins GDPR compliant.
These addons are available because you have the corresponding plugins installed and activated.
Deactive addons if you want to handle GDPR compliance yourself or using another plugin.

This may read more cleanly as:

Below is a list of addons for Cookiebot. Addons help you make installed plugins GDPR compliant.

These addons are available because you have the corresponding plugins installed and activated.
Deactivate an addon if you want to handle GDPR compliance yourself, or through another plugin.

Under Settings --> Cookiebot Addons --> Unavailable Plugins:

Following addons are unavailable. This is usual because the addon is not useable because the main plugin is not activated or installed.

This may read more cleanly as:

The following addons are unavailable. This is because the corresponding plugin is not installed.

Jetpack Error: after update to 2.4.0

Web Server Info:          Apache
MySQL Version:            5.5.60-0+deb7u1-log [mysqli]
PHP Version:              7.2.15
WordPress Version:        5.1.1

###### ACTIVE PLUGINS ######
	
All-in-One WP Migration: 6.87
Cookiebot | GDPR Compliant Cookie Consent and Notice: 2.4.0
Custom Sidebars: 3.2.2
Favicon by RealFaviconGenerator: 1.3.15
Loco Translate: 2.2.1
Members: 2.1.0
MetaSlider: 3.12.0
Page scroll to id: 1.6.4
Q2W3 Fixed Widget: 5.1.5
Simple CSS: 1.1
Site Offline: 1.3.5
Sticky Menu (or Anything!) on Scroll: 2.1.1
WP File Manager: 4.4
WP Maintenance Mode: 2.2.3
WPPizza: 3.9.4
WPPizza - Google Cloudprint: 4.0.4
WPPizza Add Ingredients: 5.1.2
WPPizza Coupons and Discounts: 2.0.13
WPPizza Delivery By Postcode: 4.0.22
WPPizza Jqeury Plugin: 1.0
WPPizza Preorder: 2.5.2
WPPizza Timed Menu: 2.0.3.3
WP Retina 2x: 5.5.1

This Error is then i Submit Data on the Admin Page.

Error:

Warning: fopen(/homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-content/plugins/jetpack/jetpack.php): failed to open stream: No such file or directory in /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/functions.php on line 5462

Warning: fread() expects parameter 1 to be resource, boolean given in /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/functions.php on line 5465

Warning: fclose() expects parameter 1 to be resource, boolean given in /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/functions.php on line 5468

Warning: Cannot modify header information - headers already sent by (output started at /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/functions.php:5462) in /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-admin/includes/misc.php on line 1198

Warning: Cannot modify header information - headers already sent by (output started at /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/functions.php:5462) in /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/pluggable.php on line 1251

Warning: Cannot modify header information - headers already sent by (output started at /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/functions.php:5462) in /homepages/32/d770397759/htdocs/clickandbuilds/PizzaHAWAIILeverkusen/wp-includes/pluggable.php on line 1254

WP Rocket caches tags based on first users consent state

WP Rocket will cache tags based on the consent state of the first user.
If the first user accepts all cookies, the tags wont be added for future users, thus Cookiebot will not be activated as it is supposed to. We should always tag scripts, regardless of consent state.

Gutenberg embed blocks

Cookies generated by the gutenberg embed blocks

Tested embed blocks with cookies

These are the blocks that did create cookie before the consent.

  • Twitter
  • Instagram
  • Flickr
  • Tumblr
  • Issuu
  • imgur

Tested embed blocks without cookies

These are the blocks that are fully supported by the CookiebotAddons.

  • Youtube
  • Facebook
  • Vimeo
  • Wordpress
  • Soundcloud
  • Spotify
  • TED
  • Reddit
  • VideoPress
  • Speaker Deck
  • Slideshare
  • SmugMug
  • Screencast
  • ReverbNation
  • Polldaddy
  • Meetup.com
  • Mixcloud
  • Kickstarter
  • Dailymoition
  • Collegehumor
  • Cloudup
  • Animoto
  • Embed
  • Wordpress.tv
  • Vimeo

Tested not working embed blocks

These are the blocks which did not work during the test:

  • Scribd
  • Photobucket
  • hulu
  • Funny or die

What needs to be done

Twitter, Instagram, Flickr, Tumblr, Issuu and imgur embed blocks needs to be supported.

Localization

With the inclusion of imbedded autocorrect the plugin now prints text to the frontend, which means that translation of said strings should (imo) be implemented rather quickly.

I would be willing to do the Danish translation.

Ninja forms plugin

Using the recaptcha settings in this plugin means recaptcha is inserted on every page, which inserts the NID cookie.

WPforms and Yoast SEO add-on

On our websites, we use Yoast SEO which includes anonymized Google Analytics plugin. It would be great if these could be added as an add-on to the CookieBot service.

Fatal Error in 2.0.0

I'm getting the following error after updating to 2.0.0

Fatal error: Uncaught Error: Class 'DI\Definition\Helper\ObjectDefinitionHelper' not found in /home/dnl1/domains/.nl/public_html/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/functions.php:45 Stack trace: #0 /home//domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(114): DI\object('cookiebot_addon...') #1 /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(69): cookiebot_addons\Cookiebot_Addons->build_container() #2 /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/cookiebot-addons-init.php(156): cookiebot_addons\Cookiebot_Addons->__construct() #3 /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/cookiebot.php(87): include_once('/home/dnl1/d...') #4 /home/dnl1/domains/d.nl/public_html/wp-includes/class-wp-hook.php(286): Cookiebot_WP->cookiebot_init('') #5 /home/dnl1/domains/d.nl/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->ap in /home/dnl1/domains/d.nl/public_html/wp-content/plugins/cookiebot/addons/lib/ioc/php-di/php-di/src/DI/functions.php on line 45

The caching cause problem before/after consent (buffer-manipulation)

This issue is only caused when buffer manipulation is used.

Expected Behavior

The website does load the correct data when the consent is given.

Current Behavior

The website does load the no consent given data when the consent is accepted.

Possible Solution

Don't cache when the consent is not given. Cache only when the consent is given.

Steps to Reproduce

  1. Don't give any consent
  2. No cookies are loaded
  3. Accept cookie consents
  4. Not all cookies are loaded because the data is still the data before the consent is given.

Declaration shortcode and widget

(This may be more suited for the main Cookiebot plugin.)

A simple shortcode that outputs the declaration. A companion widget for easy integration with widget based page builders could also be usefull.

// Add Shortcode
function cookiebot_decleration_func() {

	<script id="CookieDeclaration" src="https://consent.cookiebot.com/{{ DOMAIN ID }}/cd.js" type="text/javascript" async></script>

}
add_shortcode( 'cookiebot_decleration', 'cookiebot_decleration_func' );

Clean up redundant code

Clean up as much redundant code as possible.

Examples:

if ( ! function_exists( 'cookiebot_active' ) || ! cookiebot_active() ) {

<?php
if ($this->cookie_consent->are_cookie_states_accepted($this->get_cookie_types()) && !cookiebot_addons_enabled_cache_plugin()) {
    return;
}

cookiebot_addons_remove_class_action not rendering script on first page load

When calling cookiebot_addons_remove_class_action the <script> tag is not rendered.

Since Cookiebot uses data-src to prevent the script from being rendered, we should not remove the entire script tag, as it will then not be injected to the DOM after consent has been given first time. Rather, we should replace src with data-src and text/javascript with text/plain. If none already exist, we should add data-src and text/plain to the <script> tag.

See
https://github.com/CybotAS/CookiebotAddons/blob/develop/controller/addons/google-analytics-plus/google-analytics-plus.php

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.