The process of cross-domain tracking is complicated, even for browser tracking. A list with requirements should match in order for cross-domain tracking to work properly and accurately - besides that there are different technologies used when setting up your own implementation.
Cross-domain server-side tracking can be even more frustrating. I will cover how ss cross-domain tracking works in this article and some related topics such as Google Analytics server-side tracking, use of FPLC cookies and Stape's Cookie ReStore tag that can help reuse cookies across domains.
Cross-domain tracking allows seeing users who visited two different domains as a single session instead of two separate sessions. It helps to measure user journeys more accurately.
Google Analytics keeps track of user sessions by generating a unique client ID (_ga) for each one. This way, it can tell if someone is returning or new to the site.
When Google Analytics links users between different domains, it will use the same client ID for both websites. The client ID is stored in the browser's cookies. When cross-domain tracking is enabled, web GA will add a linker parameter to URLs that point to the destination domain.
This URL parameter contains the client ID, timestamp, and browser metadata. On a destination domain, GA will check for the parameters in the URL, and if it finds linker parameters, then GA extracts the client ID from the parameter and stores it in cookies.
When you switch over to the server-side Google Analytics and server-managed cookies, a new FPID cookie is created. This one replaces _ga and has an HttpOnly flag, meaning it is not accessible by JavaScript. This is when complications start.
We already discussed that web GA cross-domain tracking uses client ID (_ga cookie) and adds linker parameters to the destination domain. Since the FPID cookie is HttpOnly, it’s impossible to read and add it to the URL since JavaScripts can’t access HttpOnly cookie.
To eliminate this issue, Google created a new FPLC cookie.
FPLC is a hash of FPID cookies, and it’s not HttpOnly, which means that JavaScript can access FPLC and use it for cross-domain tracking.
There are a few critical nuances that you should be aware of before setting up cross-domain tracking for ss GA:
Comments