Full Guidelines On Cookie Restriction Mode In Magento 2

Cookie Restriction Mode In Magento 2

What is Cookie Restriction Mode in Magento 2?

Cookie Restriction Mode in Magento 2 platform web store is a mode that prevents your web store from collecting cookies data of customers, so full-featured operations cannot be enabled. In this mode, your visitors have to confirm that your website needs cookies to allow full-featured operations.

How to enable Cookie Restriction Mode in Magento 2?

In Cookie Restriction Mode, your web store will display a notification to alert customers that cookies are required for full-featured operations. The position of the notification depends on your theme. For more information, the notification links to the privacy policy and encourages customers to click the Allow button to grant access. After cookies are enabled, the notification disappears.

If you edit privacy policy URL, you have to create a custom URL rewrite to redirect traffic to the new URL key.

Cookie Restriction Notice In Footer
Cookie Restriction Notice In Footer

Follow these steps to enable Cookie Restriction Mode

In the backend, click Stores. Under Settings, click Configuration.

Under General on the left, click Web. Open the Default Cookie Settings tab, follow these steps:

Default Cookie Settings cookie restriction mode magento 2
Default Cookie Settings

In the Cookie Lifetime field, enter the seconds you want.

In the Cookie Path, input the path to make cookies available to folders.

In the Cookie Domain, enter the subdomain name to make the cookies available to a subdomain.

Use HTTP Only is set to “Yes” to prevent JavaScript from access to cookies.

Set Cookie Restriction Mode to “Yes”

Click Save Config after completed.

Don’t forget to clear the cache in Cache Management link and update private policy to describe the information that your online store collects from customers, and how it is used.

Above is a full guideline on Cookie Restriction Mode in Magento 2 and how to enable it in admin system. We hope that you can understand how the Cookie Restriction Mode works and how to control it in Magento 2 Basic Configuration. Leave a comment if you have any question, and subscribe Magestandard to get a notification on the next article.

Leave a Reply

Your email address will not be published. Required fields are marked *