Open luukfiets opened 1 year ago
Hey Luuk, Sorry for the (very) late reply. I'll make an effort to check issues on a regular basis in the future 🙂.
We are currently discussing server side support internally, so sadly I don't have an update this time around. I'll let you know when I have something more concrete.
Hi @Soreg,
With a Google server side GTM container it’s possible to proxy the request to consent.cookiebot.com/uc.js. Instead of getting the JS file directly from Cookiebot, we have set up our client side tag to send the requests to our GTM server url. This url is a subdomain of the clients domain.
In the server sided container we have set up a client that listens to the uc.ja path. It then claims the request, fetches the JavaScript file on the server and sends it back to the browser. The browser now thinks this JS file comes from a first party source (the subdomain). This has two benefits:
Having said that, I would like to hear your thoughts on providing a general server side Cookiebot client and making adjustments in the current GA4 (client side) Cookiebot tag.
For the client side Cookiebot tag template it needs to allow the JS file to be fetched from a custom domain.
For the server side client template code you might want to have a look at the client template we created ourself:
Please let me hear your thoughts on this. I’m happy to help with making the required changes.
Best, Luuk