what do you mean by “In the sGTM container of the destination site”? That makes no sense as sGTM is a server
The example in the article uses two different sGTMs. However, this does not significantly affect the configuration.
in this screenshot, for domain B (stape.dev), what kind of trigger do I need so cookies get restored on domain B?
You can use a trigger based on whether page_location contains the _gl parameter. It is used when navigating between cross-domains if this is configured in GA4.
on domain B in web GTM, do I need any specific Tag or script to make the restoring happening?
you need to fire Cookie Restore tag
Extra question: Do I need web GTM on domain B or can I achieve this with a Google Tag / GA4 tag only (with server_container_url)
You need GTM-sGTM as cookies will be restored based on request that sends to sGTM and on that request ReStore tag should grab cookies based on user id (_ga cookie in example) and send it on response header of init request
ok, but the init request will be available when using ga4 gtag.js + server_container_url as code snippet instead of GTM gtag.js code snippet (+ GA4 Tags) integration – or am I wrong?
I am asking this, because our client does not want to use GTM on the “domain B”, but allows to use GA4 with server_container_url.
So I am not sure, if with this setup sGTM can still send data with response header the same way as it would be with web GTM at the receiving end.
if your domain B has a gtag with server_container_url, and the server container in question has a subdomain of B pointed to it - then you can do this, yes.
sGTM will respond back to such GA4 hits same as if they came from webGTM, meaning ultimately your cookie restoration exercise would work.