This document explains how the Tolstoy Widget handles cookie consent, how it integrates with Shopify’s Customer Privacy API, and how to control acceptance or rejection programmatically.
window.tolstoyWidget?.postMessage({ eventName: 'tolstoy_reject_cookie_policy' });
localStorage.setItem('tolstoy-cookie-policy', 'rejected');
window.tolstoyWidget?.postMessage({ eventName: 'tolstoy_accept_cookie_policy' });