Hello,
do you have a simplified data tag JS code available to send the data from client-side to server-side gtm? Would be awesome to gain the ability to have a single tag for many data structures, it would save me so much time.
Thank you.
Hello,
do you have a simplified data tag JS code available to send the data from client-side to server-side gtm? Would be awesome to gain the ability to have a single tag for many data structures, it would save me so much time.
Thank you.
Hey,
I think you may be helped by the Node JS sdk: GitHub - stape-io/stape-sgtm-nodejs: Stape sGTM NodeJS SDK
Thank you @Alex!
I used chatGTP to adapt the function to javascript.
Iâm getting a response âreadyâ to the console.log.
But I donât see the âit_works_eventâ event in sGTM preview.
When I use the state template, I can see the event.
Any idea, what might be the problem?
Hey @marek
You wonât get a hit in the preview this way.
You can either manually add the âx-gtm-server-previewâ header with the actual value (you can get it in the server preview, in the menu where the three dots are).
Or enable power-up âHTTP headerâ to get all hits in the server container preview.
Keep in mind that if you have this container running live and you have a lot of traffic on your site - it will be extremely difficult for you to find something among hundreds of requests that come every second.
Thatâs why the option of adding a header to your request is much more convenient.