# How to block cookies Cookiebot Addons uses different techniques to block cookies from 3rd party plugins. This document contains explainations of the classes and functions that are available. List of included interfaces in every addon -- - [Settings_Service_Interface](#settings-service-interface) - [Script_Loader_Tag_Interface](#script-loader-tag-interface) - [Cookie_Consent_Interface](#cookie-consent-interface) - [Buffer_Output_Interface](#buffer-output-interface) List of helpers to block cookies --- - [remove_action](#remove-action) - [cookiebot_remove_class_action](#cookiebot-remove-class-action) # Settings Service Interface The Settings Service is used to store and retrieve settings. Example settings: - Check if the addon is active or not. - Get the placeholder text that should be displayed to renew a end-users consent - Get the tracking types that the addon needs consent for This will return the configured cookie types for an addon: ``` $this->settings->get_cookie_types( $this->get_option_name() ); ``` # Script Loader Tag Interface Script Loader Tag is used to manipulate the enqeueud scripts. It will add cookiebot script attributes to the script tag so the cookiebot can block the script while consent is not given. Example: Below function will manipulate scripts added with the handle 'addtoany'. The second parameter will send the cookie types that were selected in the administration UI for the addon at hand. Those types will be implemented into the data-cookieconsent attribute. ``` $this->script_loader_tag->add_tag( 'addtoany', $this->get_cookie_types() ); // will change the script tag into this