Forum Moderators: DixonJones

Message Too Old, No Replies

Server Side Tag Manager

         

ByronM

7:30 pm on Mar 12, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've been trying to get server-side tag manager to work utilizing docker containers on my local server and just can't seem to get the GTM container to allow the JavaScript to be called locally - has anyone attempted this?

I've ensured that the server-side container is published, it contains containers for GA4, Google Analytics and the API key for the container is the same one i pass to the environment and within the containers I've specified to load the JavaScript (made sure that was enabled)

I can hit test and get my test URL, but since the actual GTM tags fail locally nothing is firring - but clearly the test container/preview container is responding since it's my preview URL showing nothing.

Am I missing something obvious? Anyone try running these containers locally?

RhinoFish

10:26 pm on Mar 12, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'm not doing it server-side myself anywhere, but I have been reading about it.

Very solid intro stuff here, and the events it shows as examples are good ones.
[developers.google.com...]

Also see the link there that says "sandboxed javascript", I think those permissions and policies explained there may be relevant to your situation.

ByronM

10:51 pm on Mar 12, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yeah, it's the manual set up guide from that website I'm working through. My docker containers start, I can check the /healthz endpoints on preview and gtm container and I can click preview url inside google tag manager and see the URL running from my machine but it seems like the 3 clients aren't loading and enabling the local javascript. I may try and spin it up on GCP or AWS and see if i can at least get a working set up there... verified SSL enabled all the way through on all URLs too.

DixonJones

11:20 am on Mar 14, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I don't know about "docker containers", butu I have installed JavaScript via GTM and it seems to work. I'll send a DM

ByronM

4:30 pm on Mar 14, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So, I put the server-side containers on Google Cloud, and everything is fine - the containers are triggering and loading all the javascript.

No idea why it didn't work on my server with their docker containers... I'll have to revisit laster as GCP will get expensive long term.

(May have been something weird with reverse proxy talking to containers... since it seems to work fine using google lb's)