X Stape User ID as External ID Facebook CAPI

I have activated the staple user id, I have also seen the X-Stape-User-Id ID in the Incoming HTTP Request, How do I add variables to the gtm web container?

You can’t just access this on the web container.
But you can for example pass it to the web container via a JSON response tag. I think the easiest option is this:

  • Use the Data tag (or any other) to send a request to the server
  • This request triggers a JSON response that sends back the user id.
  • You receive this user id on the web, store it in a cookie and use it from there.