Last updated
Last updated
Publish a consent notice in .
Create a website using Adobe Commerce (Magento 2).
⚠️ If you were using the Didomi Consent Management Extension with Magento 2, please deactivate it by executing the following command and then flush Magento 2 caches:
Login to
Go to Consent Notices
Open you consent notice in edit mode
Go to Embed tab
In the "3. Publish" Section: copy the script tag
💡You can find more details on the Didomi SDK in .
The goal is to insert our SDK right after the opening <head>
tag. To do so you will need to manipulate the root.phtml
file which is used by default to setup the content of the head in Magento 2.
You will find your root.phtml
under this path: vendor/magento/module-theme/view/base/templates/root.phtml
(unless it has been overridden in your custom theme)
The root.phtml
should contain something like this:
It contains a reference to the require.js block which is defined in : vendor/Magento/module-theme/view/frontend/layout/default.xml
content of which is as follows:
What you will need to do now is to override the file in your custom theme. To do so follow these steps:
Copy therequire_js.phtml
file from vendor/magento/module-theme/view/frontend/templates/page/js
Paste it to your theme app/design/frontend/{VENDOR}/{THEME_NAME}/Magento_Theme/templates/page/js/
path
Insert just above the requireJS block i.e:
To manage tags and Vendors please refer to .
Magento native cookies could be handled by following (through the creation of custom purposes and vendors)
Adobe Commerce (formerly Magento 2) is a platform that offers various tools to manage, personalize and optimize your e-commerce website.