Freshpaint Cookie Too Large

If you are using addEventProperties or identify calls to add data to your events, this data will be kept with the user profile which will be stored in a Freshpaint cookie in order to track the user across multiple subdomains. If you are adding a large amount of data, the cookie can grow and exceed the size that browsers can handle; bloated cookies can potentially degrade app and site performance.

If you are having this issue, you can use addPageviewProperties or set up custom events to capture the data instead.

You can also store user properties in Local Storage instead of in a cookie by adding the following option into your Freshpaint init() call in your Freshpaint snippet: {"persistence": "localStorage"}. Here is an example of an init() call with this option enabled for a Freshpaint account without adblocker bypass enabled:

freshpaint.init("<your_env_id>", {"persistence": "localStorage"})

If your account has adblocker bypass enabled, your init() call will look like this:

freshpaint.init("<your_env_id>", {
"api_host": "https://<your_custom_subdomain>.execute-api.us-west-2.amazonaws.com/prod", 
"app_host": "https://<your_custom_subdomain>.cloudfront.net", "persistence": "localStorage"
});

Local Storage does not persist across subdomains. If you enable user properties to be stored in Local Storage instead of the Freshpaint cookie, you will not be able to track that user across subdomains.

Last updated