Prestashop installation

Please note that this is no longer being updated. Kindly visit the new Cookiebot support area ( for updated guides, articles and FAQs. If you do not find the answer to your question there, you are welcome to post it in the Cookiebot community (

Implementing the Cookiebot consent dialog in a Prestashop site:

Add your personal Cookiebot script tag for the consent banner (available under the tab "Your scripts" in the Cookiebot Manager) to your Prestashop theme template's header.tpl file inside the <head> tag, e.g.:
<script id="Cookiebot" src="" data-cbid="00000000-0000-0000-0000-000000000000" type="text/javascript" async></script>

Whenever you edit a .tpl file you need to force compile in Preferences > Performance before your changes are reflected.

Implementing prior consent on Prestashop plugins, addons and modules:

To enable prior consent (block cookies until user has consented), apply the attribute "data-cookieconsent" to all script tags setting cookies. Set the comma-separated value of the attribute to one or more of the three types of cookies: "preferences", "statistics" and "marketing" in accordance with the types of cookies being set by each script. Finally change the script tag attribute "type" from "text/javascript" to "text/plain". 

Example on the Google Analytics Module:
Edit the module code directly by going to the module file "ganalytics.php" and edit it.

Make the following addition (yellow markup) to the file under the function "_getGoogleAnalyticsTag":

protected function _getGoogleAnalyticsTag($back_office = false)
    return '
    <script type="text/plain" data-cookieconsent="statistics">
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        ga(\'create\', \''.Tools::safeOutput(Configuration::get('GA_ACCOUNT_ID')).'\', \'auto\');
        ga(\'require\', \'ec\');
        '.($back_office ? 'ga(\'set\', \'nonInteraction\', true);' : '').'

Showing your cookie declaration in full on a Prestashop CMS page:

If you want to show your cookie declaration in full on a seperate page or as part of your privacy policy, embed your cookie declaration script tag as described below.

In the content editor for the page or article where you want to show your cookie declaration in full, switch to html view mode and paste the script code where you want the declaration to show,

<script id="CookieDeclaration" src="" type="text/javascript" async></script>

If you are using a rich text/WYSIWYG editor, the script above may be stripped out when saving the page. To avoid this behaviour you need to enable Javascript in the editor.

Feedback and Knowledge Base