How to Enable Cookie Restriction Mode in Magento 2

Something went wrong.
Or, if you don’t want to limit to only cookie compliance law but make your Magento 2 store compatible with the GDPR law, have a look at Magento 2 GDPR extension!
As per the EU’s GDPR, the websites need to have the consent of the users regarding the use of cookies and even allow them to deny using the cookies if they wish.
Thank You.
Cookie restriction Message
Feel free to share the solution with Magento Community via social media.
Thank you for subscribing.
I would be happy to help.
Magento 2 Cookie Notice by Meetanshi
Follow the below method to Enable Cookie Restriction Mode in Magento 2.

Method to Enable Cookie Restriction Mode in Magento 2

  1. Login to Magento 2 admin panel.
  2. Navigate to “Stores > Settings Configuration”.
  3. Expand the “Default Cookie Settings” section.cookie configuration
  4. Enter the “Cookie Lifetime” in seconds.
  5. Enter the “Cookie Path” if you want to make cookies available to other folders. Enter a forward slash to make the cookies available anywhere on the site.
  6. Enter the subdomain name in the “Cookie Domain” field to make the cookies available to a subdomain.
  7. Set YES to “Use HTTP Only” to prevent scripting languages from gaining access to cookies.
  8. Set YES to “Cookie Restriction Mode”.
  9. Save the configuration by clicking the “Save Config” button.

Hence, the default Magento 2.4.x versions have introduced the feature to enable cookie restriction mode in Magento 2 store from the backend.
That’s it
Even if your business does not fall under the European Union, asking users for permission to use cookies and notifying them about the privacy policy is not only an ethical practice but also helps win their trust and increase brand loyalty.
Never miss Magento tips, tricks, tutorials, and news.
When a user accepts the cookie policy, it proceeds further in the store.
However, prior to using the customers’ data, it is mandatory to have their consent for the same.
Cookie Notice helps to implement cookie compliance in Magento 2 store. The notification bar displays a cookie restriction message and contains a button “Allow Cookies” as shown below.
Cookies help store owners track the customers’ behaviour and hence enhance their on-site experience.
Cookies are small text files stored in a web user’s browser directory or data folder that has user’s data like username, password, and browsing history.

Get Weekly Updates

However, if you are using older versions of Magento 2 and want to implement cookie notice in your store, you can opt for Meetanshi’s FREE Magento 2 Cookie Notice extension that shows a neat and simple cookie notification bar or popup in the store frontend which can be even customized as per your theme!

If you have any doubts regarding this post, just mention them in the Comments section below.
(Image Source: Magento 2.4 Devdocs)




(based on 0 Reviews)