Skip to main content
Algolia features like personalization, analytics, and A/B testing rely on cookies. These cookies identify returning visitors to your site. Laws in many regions require you to get the user’s consent before setting them. The Algolia extension supports two types of consent:
  • Implied
  • Expressed
If you rely on implied consent, use careful legal language. Make sure users understand that using your site means they agree to cookies. Magento and Adobe Commerce also include a built-in way to get expressed consent: Screenshot of a cookie consent form with a yellow background, a message about using cookies, and a blue 'Allow Cookies' button. The Algolia Magento extension supports this Magento feature by default, with some configuration required. To configure Algolia’s cookie collection policy for expressed consent, set the correct cookie restriction mode. Go to General > Web > Default Cookie Settings > Cookie Restriction Mode and adjust as follows:
  • No: the user has already agreed to cookies, so Insights events set the useCookie parameter to true.
  • Yes. Insights events won’t set a cookie in the user’s browser without their explicit consent.
To require expressed consent, enable cookie restriction mode With cookie restriction mode enabled, Algolia sets its cookies accordingly. Algolia Cookie Configuration lets you configure things further. Here you can:
  • Override the default consent cookie name
  • Specify the DOM selector ID for the cookie acceptance button
  • Adjust the duration of Algolia cookies
To examine your cookie settings, go to Stores > Configuration > Algolia Search > Credentials and Basic Setup > Algolia Cookie Configuration in the Magento Admin panel. Screenshot of Algolia Cookie Configuration form with fields for Consent Cookie Name, Allow Cookie Button Selector, and Algolia Cookie Duration. If you added third-party extensions or customized cookies on your website, update:
  • Consent Cookie Name (default is user_allowed_save_cookie)
  • Allow Cookie Button Selector (default is #btn-cookie-allow).

How to get the selector for the “Allow Cookies” button

Screenshot of a cookie consent banner with a blue 'Allow Cookies' button, a red arrow, and text instructing to retrieve the DOM Selector ID or class. If you use the default Magento cookie notification, you don’t need to change anything. If you use a custom notification, copy the cookie button selector ID from your website’s cookie notification setup.
Last modified on September 16, 2026