I am seeing a large number of local_storage cookies for mixpanel appear in my Termly CMP, has there been a change in cookie handling recently?
Hi Chris S., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Based on the provided knowledge sources, there is no explicit mention of a recent change in Mixpanel's handling of localStorage or cookies. The documentation confirms that Mixpanel's JavaScript SDK can use either cookies or localStorage for persistence, and you can configure this behavior using the persistence option during initialization (e.g., mixpanel.set_config({ persistence: "localStorage" })). This is recommended for reliability, but note that using localStorage disables cross-subdomain tracking, which is possible with cookies by default Mixpanel JS SDK: Library Configuration | Quickstart FAQ.There is also no indication in the sources of a recent update that would cause an increase in the number of localStorage entries specifically. If you are seeing more localStorage cookies, it may be due to a configuration change in your implementation (such as switching from cookie to localStorage persistence), or possibly due to how your Consent Management Platform (CMP) is surfacing or categorizing these storage items.If you have not changed your Mixpanel configuration recently, it may be worth reviewing your initialization code or checking for updates in your CMP's detection logic. For further details on Mixpanel's storage options and privacy controls, see the documentation on Mixpanel Cookie and Protecting User Data.If you need to disable persistence entirely (no cookies or localStorage), you can set disable_persistence: true when initializing Mixpanel, but this will impact features like super properties and user identification Quickstart FAQ.In summary, the knowledge sources do not indicate a recent change in Mixpanel's cookie or localStorage handling. If you suspect a change, it is likely due to configuration or environmental factors rather than an update from Mixpanel itself.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.
Chris, I just ran into this as well. Are you using Google Tag Manager by chance? If so, https://github.com/mixpanel/mixpanel-gtm-template/pull/18 changed the default persistence to localStorage.
Great. In the mean time, you'll probably want to update your GTM tag's Initialization section to specify Initializtion Options as Set options manually, then set Option key persistence to cookie
