Question about Google Tag Gateway

We’re looking to move Google tracking to server side and the Google Tag Gateway seems like a perfect fit for our needs.

I’m a bit confused implementing this, especially regarding whether we need “own domain” or “custom loader” or both to achieve the best result.

Importantly, our motivation for implementing this is to get GTM out of the client for page performance/speed reasons. We have a React/Next.js application that we’re in the process of optimizing and we want to remove GTM as a blocker so it doesn’t affect performance when the user loads/interacts with the page.

If the tracking also improves then that’s a bonus, but it’s not the main goal.

Can somebody point me in the right direction to get this implemented in a way that aligns with our goal?

TIA.

@redbrick you will not be able to remove GTM if you want proper GA4 tracking. GA4 is reliant on gtag to fire in the browser, regardless of whether if it’s then proxied through a server.

There’s no proper solutions to remove it in full but still have reliable data in google analytics. So if page-speed is your main goal, then you have to say bye-bye to GA4 in general :confused:

Hi Dan, thanks for replying.

My understanding was that by switching to server-side GTM, the number of requests and amount of code execution on the client would be reduced. Is that not correct?

That is correct in principle, because you can report to X destinations from the server, relying on a single idata stream incoming from the client side.

If we talk only GA4, that single stream for single destination (GA4 itself) would remain in place therefore not delivering any page speed improvements. What could be done is a lot of other client-side pixels can be move to the server completely thus achieving some better numbers in the speed scores.

I would treat this a usueful side effect, rather then main feature of s2s tagging.

I would also have 2 questions about the Google Tag Gateway.

  1. Enhanced conversions are working with the gateway. I need configure them in the web container, correct?
  2. Google Consent Mode is also working. I also need to configure that in the web container, correct?

For enhanced conversion to work, you need to pass user data along with the required event. So yes, this is configured first of all on the web container so that this data is further transmitted to the server together with the event.

And also the operation of tags according to the consent is also configured on the web container. Tags should be triggered when the state of the consent is already known.