Skip to main content

Magento installation

Comments

2 comments

  • Serhii Chernenko

    Create a new JS file:

    app/design/frontend/VENDOR/THEME/Magento_Theme/requirejs-config.js

    Replace VENDOR/THEME with your own theme name and add the following content:

    const config = {
    paths: {
    // create an alias
    cookieBot: 'https://consent.cookiebot.com/uc.js?cbid=00000000-0000-0000-0000-000000000000'
    },
    deps: ['cookieBot'] // load the script on all pages by the alias calling
    };

    That's it. No need to create a JS file and include it in the XML file.

     

    0
  • Simon Sprankel

    If you want to have a convenient way how to install Cookiebot in your Magento store, you can also use our free extension:

    Cookiebot Extension for Magento 1

    Cookiebot Extension for Magento 2

    0

Please sign in to leave a comment.