I want to store some custom data (e.g., user IDs, preferences, or tracking info) using a GTM Server container on a free Stape domain. My goal is for this data to be associated with browser cookies on the client side.
I’m aware that:
Free Stape domains are third-party, so cookies may be blocked by browsers.
I may not be able to set first-party cookies for my main site using the free domain.
My question:
What’s the best way to store custom data for visitors using a free Stape domain?
Can it be done reliably via cookies, or are there other recommended storage options?
@Dan I don’t want to use a custom domain; I want to use Stape’s free domain. I want to store some event data or variable data from the server-side container into client-side browser cookies.
@Alex I think you didn’t understand my concern. I want to use Stape’s free plan, and I want to store some variable data from the server-side container into my website’s browser cookies so that I can retrieve it on the client side. I am not referring to only first-party cookies.
If you want to set cookies from your sGTM, you can only do so if your sGTM operates in a first-party context, i.e. uses a subdomain of the main domain where you want to set the cookie for the user.