Skip to content

Instantly share code, notes, and snippets.

@kicybot
kicybot / cookiebot_drupal.php
Last active Jun 7, 2018
Cookiebot Drupal 7 template.php
View cookiebot_drupal.php
<?php
function theme_preprocess_html(&$variables)
{
$cookiebot = array(
'#type' => 'markup',
'#markup' => '<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="00000000-0000-0000-0000-000000000000" type="text/javascript" async></script>' . "\n"
);
drupal_add_html_head($cookiebot, 'cookiebot_banner');
}
View cookiebot_tripadvisor.html
<div id="TA_rated9" class="TA_rated cookieconsent-optin-marketing">
<ul id="cEEerS4Y0RA5" class="TA_links GQUyDNk">
<li id="ZBlQhNTUC2" class="2rx1dG9">
<a target="_blank" href="https://www.tripadvisor.it/">
<img data-src="https://www.tripadvisor.it/img/cdsi/img2/badges/ollie-11424-2.gif"
data-cookieconsent="marketing" alt="TripAdvisor"/>
</a>
</li>
</ul>
</div>