GA4 & Ads Cookie Decoder
See what your tracking cookies really contain: the GA4 client ID and first visit, the current session and when it times out, the stored Google Ads click (gclid) and the Meta fbp / fbc values your Conversions API should send.
On your website press F12, open the Console, type copy(document.cookie) and press Enter. The cookies are now copied; paste them here.
Private by design: everything is decoded in your browser. Nothing you paste is uploaded or stored.
Cookies expiring after 7 days in Safari?
I set up server-side tagging so GA4, Google Ads and Meta cookies are set by your own server and last as long as they should.
How to use the GA4 & Ads Cookie Decoder
Google and Meta store the IDs they need in first-party cookies on your domain. _ga holds the GA4 client ID, _ga_<ID> holds the current session, _gcl_aw holds the last Google Ads click, and _fbp / _fbc hold the Meta browser and click IDs that your Conversions API events should include. Decoding them shows what each platform will actually see.
Step by step
- Open your website, press F12 and go to the Console tab.
- Type copy(document.cookie) and press Enter. Your cookies are copied to the clipboard.
- Paste them here and click Decode.
- Compare the client ID with the cid in your GA4 requests, and the fbp / fbc values with your server events in Meta Events Manager.
How to read your result
All cookies present
GA4, Google Ads and Meta can identify returning visitors and attribute conversions to their clicks.
Session timed out or click older than 90 days
This is expected for older visits. A new session starts on the next hit, and old clicks no longer earn conversion credit.
No _ga or no _ga_<ID>
The GA4 tag has not run in this browser: it is blocked, waiting for consent, or not installed on this page.
Common mistakes
- Reading cookies on a different subdomain than the one with the tags, so they seem missing.
- Hashing fbp or fbc before sending them to the Conversions API. Meta expects them unchanged.
- Building the client ID from the whole _ga value instead of the last two numbers.
- Server-set cookies being overwritten by the browser tag because both use the same name.
Questions
Why are some cookies not shown by document.cookie?
Cookies set with HttpOnly (often by server-side tagging, like FPID) are hidden from JavaScript. Find them in DevTools → Application → Cookies.
How long do these cookies last?
Browser limits apply. Safari caps cookies set by JavaScript at 7 days, which is a key reason to set them from your server.
Is it safe to paste my cookies here?
Decoding runs only in your browser and nothing is uploaded. Avoid pasting login or session cookies from admin areas anyway.
Cookies expiring after 7 days in Safari?
I set up server-side tagging so GA4, Google Ads and Meta cookies are set by your own server and last as long as they should.