Magento 2 implementation

How to implement the consent Pop-up using the script in Magento 2.

Implement with Magento 2.x

  1. Go to Admin Panel in Magento
  2. Navigate to: Content > Design > Configuration
  3. Choose the Store View
  4. Click “Edit” on the appropriate store view (or Global / Default if you want it to apply everywhere)
  5. Go to “HTML Head” Section
  6. Find the field: Scripts and Style Sheets
  7. Paste our main installation script:
<script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="EN" type="text/javascript"></script>

Note: The attribute data-culture = “EN” controls the language in which the popup will appear on the page – in this example, it will be displayed in English. To change the language, set the data-culture attribute to a different language code. For more details, see this article.

  1. Save the configuration
  2. Clear the cache: Go to System > Cache Management and clear the cache for changes to take effect.

Was this article helpful?