Use of cookies & localStorage
The cookies and storage entries are used exclusively to ensure that surveys are delivered correctly from a technical perspective, to prevent multiple displays, and to link responses with participations or purchases.
Only the user ID ph_user_id is stored as a cookie or in localStorage, depending on your setting. PollHero always stores all other entries in the browser's localStorage or sessionStorage. You can find out how to set the storage type and lifetime in Cookies & localStorage.
Cookie or localStorage (configurable)
| Name | Storage period | Description |
|---|---|---|
ph_user_id | Cookie: configured lifetime (default 365 days); localStorage: persistent | Recognizes a user (anonymized UUID). |
localStorage
| Name | Storage period | Description |
|---|---|---|
ph_survey_viewed | persistent | Prevents surveys that have already been seen from being displayed again. |
ph_survey_at_least_one_answer | persistent | Remembers surveys in which the user has answered at least one question. |
ph_survey_completed | persistent | Prevents surveys that have already been completed from being displayed again. |
ph_order_ids | persistent | Links purchases with survey responses. Prevents the same order from being recorded twice within 60 minutes. |
ph_utm_data | persistent | Stores the source and medium of the visit (UTM parameters or referrer) so that responses can be attributed to a channel. |
ph_survey_minimized_{ID} | persistent | Remembers that an Onsite survey was minimized and should stay minimized after a page change. |
sessionStorage
Entries in sessionStorage are deleted as soon as the browser tab is closed.
| Name | Storage period | Description |
|---|---|---|
ph_survey_session_{ID} | until the tab is closed | Assigns responses on different pages to the same participation. |
ph_attributes_{project}_{user} | 30 minutes | Caches the user attributes for targeting so they don't have to be reloaded on every page view. |
ph_survey_entry_url_{ID}, ph_survey_last_url_{ID}, ph_survey_redirected_{ID} | until the tab is closed | Detect a page change so that a minimized Onsite survey stays minimized. |
Earlier versions of PollHero also set ph_last_answer, ph_survey_prob and ph_question_viewed. These entries are no longer used and are deleted automatically on the next page view. Entries that older versions stored as cookies are moved to localStorage once.