How to implement Cookie Re-Store on domain B?

In the Blog I do not understand how to set this up on domain B (stape.dev)
This is point 4 in the blog article.

My questions are:

  • what do you mean by “In the sGTM container of the destination site”? That makes no sense as sGTM is a server

  • in this screenshot, for domain B (stape.dev), what kind of trigger do I need so cookies get restored on domain B?

  • on domain B in web GTM, do I need any specific Tag or script to make the restoring happening?

  • 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)

Would be amazing to have a video for that :slight_smile:

@Alex could you help me out here?
The blog article seems not to describe how the re storing works.

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

1 Like