Magento 2
How to implement Visible Privacy with Magento 2.
This installation guide explains how to install Visible Privacy™ Consent on your Magento 2 store. If you encounter any problem during the installation, feel free to send an email to [email protected]
Implementing Visible Privacy with Magento 2
This guide explains how to install Visible Privacy™ Consent on your Magento 2 store.
Prerequisites
Before beginning, ensure you have:
- Access to your Magento Admin panel.
- Administrator privileges.
- Your Visible Privacy Client ID (provided to you by Visible Privacy).
Installing the Visible Privacy Script
Navigate to Configuration
Log in to your Magento Admin panel. Go to Content
> Design
> Configuration
.
Select Store View
Find the specific store view (or the global scope) where you want to add the script. Click Edit
in the corresponding row.
Add Script to HTML Head
Scroll down to the HTML Head
section. Locate the field labeled Scripts and Style Sheets
. Paste the following script block into this field:
Replace Placeholder
In the pasted script, replace "MerchantID"
with the actual Client ID provided to you by Visible Privacy. Important: Ensure you keep the double quotes around your Client ID.
Save Configuration
Click the Save Configuration
button in the top right corner.
Clear Cache (Recommended)
It's often necessary to clear Magento's cache for the changes to take effect. Go to System
> Tools
> Cache Management
and refresh any invalid cache types, particularly Page Cache
and Configuration
.
Using your correct Client ID is essential for the banner to load and function correctly.
Placing the script as the very first element within the <head>
tag is highly recommended. This ensures the consent banner loads as quickly as possible, before other scripts that might potentially set cookies or trackers.
After saving the configuration and clearing the cache, the Visible Privacy™ Consent banner should appear on the selected store view(s) when a user visits for the first time, providing options to manage cookie consent.