Código BLACKGO: banner de cookies grátis durante um ano. Criar conta →

Every package installs the module in the consent folder in the site root and loads it at the start of every page request, before any code reaches the browser. That is how the module blocks tracking scripts on the server, including scripts added by the theme and other plugins.

SystemVersionsHow to install
WordPress (also WooCommerce)5.8+Plugins → Add New → Upload Plugin → consetgo-wordpress.zip → Install Now → Activate. Panel: menu Cookie consent → Open the consent panel.
Joomla4, 5, 6System → Install → Extensions → Upload Package File → consetgo-joomla.zip. The plugin “System - consetgo Cookie Consent” enables itself.
PrestaShop1.7.7, 8, 9Modules → Module Manager → Upload a module → consetgo-prestashop.zip, then Configure → Open the consent panel. A shop needs the “Online shop” plan.
Drupal10, 11Unpack consetgo-drupal.zip into modules/custom → Extend → tick “consetgo – Cookie Consent” → Install. Panel: Configuration → System → Cookie consent (consetgo).
TYPO312, 13, 14Composer: unpack into packages/consetgo, run composer require consetgo/consetgo:@dev and vendor/bin/typo3 extension:setup. Classic mode: Admin Tools → Extensions → Upload Extension. Then open any page of the site.
Other PHP sitePHP 7.2+Upload the consent folder to the site root and add one line to the start file (below).

Detailed guides for each system: Integrations.

PHP site without a CMS

Open the start file of the site (usually index.php) and on the second line, right below <?php, paste:

require_once __DIR__ . '/consent/bootstrap.php';

Add the same line to other PHP files opened directly (for example contact.php). The line must run before the first character of HTML is sent.

Where to put the line and what to watch out for

Download a copy of index.php before you change it – a mistake in this file can take the whole site down. The safest way is to copy the ready line from the “Installation” card on the module’s Dashboard: it has the full path on your server.

  • Too low, below HTML: everything above the line (for example <!DOCTYPE>, the header, an empty line after ?>) reaches the browser without the module, and scripts in that part run before consent.
  • declare(strict_types=1); or namespace at the top of the file: put the line below them – they must be the first statement, otherwise PHP reports an error and the page does not open.
  • A file in a subfolder (for example shop/index.php): __DIR__ points to the subfolder, so __DIR__ . '/consent/bootstrap.php' is wrong and the page shows error 500. Use the full path from the Dashboard.
  • File encoding: save as UTF-8 without BOM – the invisible BOM character is also sent before the module.
  • Several start files: add the line to every PHP file opened directly from the browser. Including the module twice breaks nothing – it loads once.
  • The file gets overwritten: an update, a new version of the site or a template change can remove the line. The Dashboard then shows “Limited mode — scripts are not blocked.”.
  • A variant that survives a missing folder: if (is_file(__DIR__ . '/consent/bootstrap.php')) { require_once __DIR__ . '/consent/bootstrap.php'; } – the site keeps working even if the consent folder disappears, but then without the banner and blocking, so check the Dashboard.
  • WordPress, Joomla, PrestaShop, Drupal, TYPO3: do not edit CMS files – use the plugin from the package, which loads the module itself.

After the change open the Dashboard: “full protection” means the module handles the pages and blocks scripts.

Advanced installation

  • You can rename the consent folder – the module detects its paths. The data folder inside needs write permission.
  • Laravel: add the line to public/index.php; other frameworks: to the file that handles all addresses (front controller).
  • Without editing code (PHP as an Apache module): add php_value auto_prepend_file "/full/path/consent/bootstrap.php" to .htaccess. On PHP-FPM this line causes error 500 – use auto_prepend_file in .user.ini or php_admin_value[auto_prepend_file] in the pool configuration.
  • nginx does not read .htaccess, so block access to the module data: location ~ ^/consent/data/ { deny all; }. The panel warns you when the data folder can be reached from the internet.
  • Full HTML cache (Varnish, LiteSpeed, static files from WP Super Cache): add <link rel="stylesheet" href="/consent/api.php?a=css"> and <script src="/consent/assets/banner.js" defer></script> to the template. The panel then shows limited mode, and scripts have to be marked by hand (see For developers).

Experimente o consetgo no seu site

14 dias grátis. A instalação demora poucos minutos.

Experimente 14 dias grátis