I’m storing some hashed user data and cookies on Stape Store. Right now, I’m using _ga cookie value and X-Stape-User-Id as keys to store these data. I’m using this so that data can be persistent between domain A and B. I noticed _ga value stays the same if I go from domain A → B (there’s a directly link from A to B.) But if I started on B first and went to A (no directly, had to type it in,) _ga will change. Additionally, X-Stape-User-Id changed based on hostname (in this case, the domains) so the keys will not be persistent throughout all of them.
Any suggestions about a user_id I can use to make everything persistent from A to B? My idea is to use hashed IP data, but it might not be a good idea.
Stape user id is generated also based on hostname, so it will be different between different hostname and it is not suitable for cross-domain tracking.
Usually google analytics cookies are used for this. Cookie _ga or FPID. This is because in GA you can easily configure cross-domain transitions to have the same cookie on your different domains. But this can only work for click-through transitions, but not for transitions by typing the site address in the line.
Here’s a good article about cross domain in GA4: Cross-domain tracking in Google Analytics 4 - Analytics Mania