Server side Google Tag Manager – Should you switch to Cloud Run?

server-side gtm banner

Server side Google Tag Manager – Should you switch to Cloud Run?

server-side gtm banner
Marketing Technology Lead
5 min. leestijd
5 april 2024

What is Cloud Run?

Cloud Run is a serverless platform. It is an evolution on the App Engine platform where some of the great features of App Engine are incorporated into a more robust package that is more flexible and can handle more workloads. It is able to scale up quickly when you need more resources, for example when your website traffic spikes, and scale down when website traffic is lower. You only pay for what you use, this way you have more control over the amount of money you need to spend in order to run a server side tagging deployment.

Cloud Run is also ideal when you run a server-side tagging setup in multiple regions. You can configure a load balancer to send events from your website to process in a Cloud Run instance in a specific region.


A single Cloud Run instance costs about $45 (USD) per month. This is running with 1 vCPU and 0.5 GB of memory. A single instance of App Engine with similar specifications will cost you about $40 (USD) per month. This might look cheaper, but Google does recommend at least three App Engine instances compared to two for Cloud Run. It is up to you if you take their advice. It does reduce the risk of data loss if the server goes down for any reason. 

Similar to App Engine, the Cloud Run instances will automatically scale up when the traffic increases. This also means the costs will increase. You can choose to set a maximum of instances Cloud Run is able to spin-up. This will prevent very high costs in case of a spike in website traffic. Do keep in mind this might limit performance if the traffic is high and the amount of instances is low. What App Engine does not offer is the ability to scale all the way down to zero instances. Zero instances means no costs! Though this will only work if you are certain that your website will not receive traffic for a certain amount of time.
Giving an exact figure of what your setup will cost is nearly impossible. Due to the pay what you use pricing model and playing around with the amount of instances, costs can vary each month. Google provides a Cloud Run cost calculator to calculate an estimate based on the amount of inbound and outbound events.

If costs are your main driver, you might want to go for a Cloud Run setup. We recommend checking the cost calculator to create an estimate for yourself. If you have an existing setup, you should have a good indication of traffic volumes. 

And if you have a website focussed on multiple regions, you can enhance your setup with Cloud Run and a multi-region load balancer. It is easy to setup once you have your Cloud Run environment up and running. 

That brings up a reason why you might want to keep using App Engine. More flexibility often means more complexity. Setting up Cloud Run, even though it now is the default environment when setting up your server side GTM container, is a bit more complicated for the average person than setting up an App Engine. Though we believe the flexibility weighs more than the complexity it brings along. 

That is why we recommend setting up an environment using Cloud Run and experiment with the settings to find the sweet spot for your organization. We are happy to help you in this process and are always open to having a conversation with you about server side tagging.

Meer artikelen?

Benieuwd waar jouw kansen liggen?

Neem vrijblijvend contact op en kom een kopje koffie drinken bij ons op kantoor in Amsterdam of Groningen!

Join onze WhatsApp community voor wekelijkse updates