Cookie policy
Overview
Contentful Personalization uses browser storage and cookies to maintain visitor identity and cache personalization state. This page documents what is stored, where, and why.
localStorage
Using any of our JavaScript SDKs will add the following localStorage items:
If you use the Privacy Plugin, it also stores:
Cookies
If you implement server-side or edge-side personalization, your middleware or server code should set the following HTTP cookie:
Important:
The ntaid cookie must always be set from the Experience API response (response.data.profile.id), not from the incoming request cookie. After profile merges or relocations, the canonical profile ID may change. Using the old value leads to duplicate profiles.
The ntaid cookie and nt_anonymous_id localStorage value represent the same profile ID. The SDK reads nt_anonymous_id in the browser. Server-side code reads ntaid from the cookie. Both should refer to the same visitor.
sessionStorage
Contentful Personalization does not set any sessionStorage keys.
Source reference
For reference, the storage key constants are visible in our open-source SDKs.