What is Cookie Keeper?
Cookie Keeper is an add-on that automatically backs up critical tracking cookies (GA4, Meta Pixel, TikTok, etc.) to localStorage and restores them if the browser deletes them.
Why use Cookie Keeper?
- Safari ITP: Intelligent Tracking Prevention trims cookies to 7 days.
- Firefox ETP: Enhanced Tracking Protection blocks cross-site cookies.
- Loss of attribution: Without cookies, GA4 loses 20-30% of returning visitors.
- ROI: Restoring cookies = better attribution = more accurate ROAS.
How to activate
- Go to Dashboard → Add-ons
- Turn on the "Cookie Keeper" toggle
- Select the standard cookies to back up (GA4, Meta, TikTok, Google Ads, etc.)
- Add custom cookies (a JSON array, e.g.
["_my_custom_cookie", "_another"]) - Set the retention period (recommended: 730 days = 2 years)
- Optionally: set a custom cookie domain (e.g.
.yourdomain.cz) - Click "Save Cookie Keeper"
Which cookies get backed up?
Standard cookies:
_ga,_ga_*— GA4 Client ID and session_fbp,_fbc— Meta Pixel browser ID and click ID_ttp— TikTok Pixel_gcl_au,_gcl_aw,_gcl_dc— Google Adssbjs_*— Sourcebuster.js (attribution)
How does it work?
- The Cookie Keeper script runs on every page
- Periodically (every 5s) it checks for the existence of the cookies
- If a cookie exists → it saves a copy to localStorage
- If a cookie is missing → it restores it from localStorage
- The localStorage record validity: 2 years (configured)
⚠️ GDPR notice:
Cookie Keeper only restores cookies that the user has already consented to. Use cookie consent management (e.g. Cookiebot, OneTrust) before activating.