Get Free Audit

How to Configure & Edit Cookies in Magento 2

Dec 10, 2015

14310 Andrey Litvin

How to Configure & Edit Cookies in Magento 2

What are Cookies?

If as a user you enabled Cookies on a website, it will create small files on your computer where it saves some information. This information is then used to make your shopping experience more personal. For example, it saves information about your choice of language and next time you visit the website, it uses the language you selected previously.

Different countries have different policies regarding Cookies.

In some countries, it’s implied that visitors know that Cookies are a necessary part of operations and when they use the website, they agree on Cookies.

In some countries, there should be a pop-up saying something like “This site uses Cookies. Agree to Use Cookies”. In such cases, some operations are not enabled unless a user agrees on using Cookies.

Where can you configure Cookies in Magento 2?

Go to Stores > Configuration > (General) > Web > Default Cookie Settings

Cookies in Magento 2.0

Cookies in Magento 2.0 Cookies Configuration

  • Cookie Lifetime. It’s how long Cookie files stay on a user’s computer. By default, it’s set as 3600 seconds which is equal to about 1 hour. If you want to ensure that cookies expire when a user closes their browser, then select 0 here.
  • Cookie Path. To make cookies available for some particular folders, enter the Cookie Path here. If you want them to be available anywhere on your site, then enter a “/”.
  • Cookie Domain. If you want to enable cookies for a subdomain, enter it here. If you want to enable cookies for all subdomains, enter something like “.domain.com” (make sure there is a “.” before your domain name).
  • Use HTTP Only. To prevent your store from Malware, select “Yes” here. It uses HTTP protocol only and doesn’t allow other protocols such as JavaScript.
  • Cookie Restriction Mode. You need to select “Yes” here.
Magento support

Magento Support & Maintenance

Take your online store to the next level with BelVG Magento Support & Maintenance

Visit the page

Where can I edit Cookies Policy?

Navigate to Content -> Pages.

Then select Privacy policy page and in “Action” column select “Edit”.

2_cookies

Select the store view where the Cookie Restriction message should appear and switch status to “Enabled”.

Cookies in Magento 2.0

Now go to the Content tab and edit your Privacy Policy, press this button to switch to WYSIWYG editor mode:

Cookies in Magento 2.0

In this privacy policy describe what information your company collects and how it is used.

In default Magento 2.0 theme you can find it in the footer:

Andrey_Dubina
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Andrey

Cookies in Magento 2.0

And here is how it looks on Frontend:

Cookies in Magento 2.0

magento_ico_1.9_layered_navigation

Layered Navigation

Take your online store to the next level with BelVG module

Download here

Where can I change the popup message about Cookies?

Navigate to Content -> Pages

Then click to edit Enable Cookies page.

Cookies in Magento 2.0

Then enable this message. And select for which store views you want to apply it.

Then go to Content and edit the message.

Cookies in Magento 2.0

Cookies in Magento 2.0 Edit the message

Here is how this message will look on the default Magento theme:

Cookies in Magento 2.0

Cookies in Magento 2.0 Default Magento Message

Check also: How to Update the Copyright Notice in Magento 2.

Looking for a professional Magento development team? BelVG is here to help!

magento webdesign

Magento Webdesign

Take your online store to the next level with BelVG Magento Webdesign

Visit the page
Andrey Dubina
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Andrey

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *