Our brands

How to manage cookie policy Magento 2?

Cookies are designed to be a reliable mechanism for websites to remember stated information (in an online store, they are items added to the shopping cart) or to record the user’s browsing activity (including clicking particular buttons, logging in, or recording which pages were visited in the past). Definitely, cookies create convenience for your customers in many ways. Therefore, to manage cookie policy Magento 2 plays an important role in your store organization.

In this post, I gonna show you steps to manage cookies policy on Magento 2 store.

1. Enable cookies restriction mode

Admin panel > Stores > Configuration (under Settings)


On the left-hand side of the panel, click on Web under General. Then expand the Default Cookie Settings section


there you’ll see 5 heads including:



Cookie Lifetime: enter the cookie lifetime in seconds

Cookie Path: enter cookie path if you want to make cookies available to other folders.

Cookie Domain: enter the subdomain name to make the cookies available to a subdomain

Use HTTP Only: If you set to “No”, user security could be compromised; set to “Yes” to prevent scripting languages such as JavaScript from gaining access to cookies.

Cookie Restriction Mode: set to “Yes”

Then, click Save Config to complete to process

When prompted to update the cache, click the Cache Management link in the system message. Then, refresh the invalid cache.

2. Edit the Cookie Restriction Message

Admin panel > Content > Pages (under Elements)

cookie page


In Pages section, choose Enable Cookies and click “Select” at the end of the row


When the “Enable Cookies” is opened, active the “Enable Page” and complete the content as needed and page description with information that you collects and how it is used


Then, click “Save page” to end process.

3. Update privacy policy

Admin panel > Content > Pages (under Elements)

cookie page


Choose Privacy Policy head and open the edit mode

cookie pp

In this section, you will do the same as step 2 including the description content you apply.

Then click “Save Page” to end process

This is the end of my tutorial on managing cookies policy on Magento 2. Hope it helps you well!
In case, you need to customize any things on your site, please feel free to contact us to [email protected] Some of the small changes are free of charge, get more detail about our custom work service here: Magento Development Services

Visit some related posts that you may be interested in on Venustheme:

Share this Post!

0 Comment

Leave a Comment

Your email address will not be published.

Do NOT follow this link or you will be banned from the site!