Is there any documentation about cfz_
Is there any documentation about cfz_google-analytics_v4 cookie?
4 Replies
What questions do you have? I've worked with it some before (adding compatbility for a integration that needed to pulled data from "Google's" cookies where I mocked them using data pulled from the Zaraz cookie)
i see some of the ga4 cookie values stored in cfz_google-analyticsv4 and decoding it allows me to see what appears to be the client id and session id but it looks like the measurement id is missing... ga<ContainerId> is missing also i am guessing that the client id is the uuid value... just i guess wondering if cloudflare has the components of the cookie document some where it would be very helpful
For example, i can see this data from the cookie: but it's unclear what each of the keys within the encoded json structure represent or how they specifically would map to google analytics api
i am assuming egnm_ga4.v is a custom client_id
I found info through looking at the implementation here: https://github.com/managed-components/google-analytics-4
I don't think measurement ID is stored there. My implementation pulls it out of a zaraz variable (that's also used to set it in the GA4 tool)
These are two resources I referenced in my notes:
- https://crossmasters.com/en/blog/ga-cookies-explained/
- https://www.bbccss.com/explanation-of-cookie-values-used-by-ga4.html
Ran your cookie through chatgpt with my code and these are the labels (looks mostly right):
- egnm_engagementDuration:
The duration of user engagement (in milliseconds). A value of "0" means no active engagement was recorded.
- egnm_engagementStart:
The timestamp (in epoch format) when the user's engagement began.
- egnm_counter:
A general counter that likely tracks the number of events or interactions.
- egnm_session_counter:
The count of sessions the user has initiated on the site.
- egnm_ga4:
A unique GA4 client identifier used for tracking and analytics.
- egnm__z_ga_audiences:
An identifier for audience segmentation that matches the GA4 client ID.
- egnm_let:
The timestamp of the last recorded event.
- egnm_ga4sid:
The GA4 session ID, which uniquely identifies the current session.
awesome yeah that matches what i got here as well that link via github is super helpful i did not realize the zaraz code was open like this