-
Notifications
You must be signed in to change notification settings - Fork 67
Enable or Disable Cookie Filter
Welcome to the guide on enabling or disabling the Cookie Filter in the MailChimp for WooCommerce Integration. This guide will help you understand how to control the use of cookies for site shoppers.
By default, our plugin uses cookies to track cart data and ensure the correct population of the cart for each shopper. These cookies are stored for 30 days. However, we've received requests to disable cookies for site shoppers. To accommodate this, we've implemented a custom function that allows you to control whether or not a cookie should be allowed.
Here's an example of how to disable cookies:
function custom_cookie_callback_function($cookie_name) {
return false;
}
add_filter( 'mailchimp_allowed_to_use_cookie', 'custom_cookie_callback_function', 10, 1 );
Please note that disabling cookies will result in the loss of abandoned cart Automations for all guest customers. However, logged-in users will continue to function as expected.
This is the shopper’s email address. We use this to track cart data and also allow Mailchimp to send the shopper back to your site to reload the cart from any device and ensure the cart is populated correctly.
This is the “first page” that the customer lands on.
This is for the use case where the customer “had” an email saved in the session but then changed it. We use this for deleting old cart data and starting fresh.
This is the shopper's current email in session, to be compared against the “previous email” – but is directly related to the mailchimp_user_email.