Use Stape User ID as user identifier for Cookie Keeper

Due to some limitations of a SaaS ecommerce platform, I may need to use Stape user ID as the identifier for the cookie keeper.

Now, I’ve checked the generated custom code, but it’s not clear for me how the Stape user ID value is retreived.

Indeed, I see a variable E="stapeUserId" in the custom loader code. But in my Server side setup, I define the “user_id” as the value of the Request Header variable “X-Stape-User-Id”.

My question is if I should setup anywhere in the server container a variable named “stapeUserId” with the value of the X-Stape-User-Id or does the Cookie Keeper retreive automatically from the header the value of the user id.

For CookieKeeper this works automatically, you don’t need to do anything other than use the GTM snippet generated in the Stape admin panel.

1 Like