SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How Do I Disable Analytics.js Cookies?

Question

How can I disable Analytics.js cookies so that the library does not set any cookies by default when loading on my website?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

You can disable all Analytics.js cookies and all other local storage behavior by loading Analytics.js with the setting disableClientPersistence: true. This turns off client-side persistence completely, meaning Analytics.js will not write any userId, anonymousId, traits, group data, or pending events to cookies or localStorage. When this setting is enabled, Analytics.js stores all data in memory only and does not persist identity across page loads.

 

Additional Information 

Learn more about Analytics.js cookies in Client-side Persistence in Analytics-js.

Have more questions? Submit a request
Powered by Zendesk