Qookies.php
is a lightweight utility library to interact with the Qookies plugin from PHP.
To install the utility, upload /Qodio/
to your web-server. With a manual install you'll have to manage autoloading of classes yourself.
The Qookies
plugin uses four categories for cookies:
strict
for strictly necessary cookiespreferences
for user preference and UX cookiesstatistics
for statistics and analytics cookiesmarketing
for targeting and advertising cookies
To check the consent status of a browser window, simply call the appropriate function on the Qookies class.
The following example shows how to perform conditional logic or includes if a user has given consent to marketing cookies:
<?php
use Qodio\Qookies;
if (Qookies::marketing()) {
echo 'User has consented to marketing cookies';
}