{"id":64083,"date":"2025-02-02T10:05:31","date_gmt":"2025-02-02T10:05:31","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/gtmtips-setup-a-google-tag-manager-server-using-cloud-run\/"},"modified":"2025-02-02T10:05:31","modified_gmt":"2025-02-02T10:05:31","slug":"gtmtips-setup-a-google-tag-manager-server-using-cloud-run","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=64083","title":{"rendered":"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p>While <strong>Google App Engine<\/strong>, the default implementation pattern of <a href=\"https:\/\/www.simoahava.com\/analytics\/server-side-tagging-google-tag-manager\/\">server-side Google Tag Manager<\/a>, is straightforward to setup with the <a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side#set_up_a_gcp_tagging_server\">automatic provisioning steps<\/a>, it\u2019s certainly not the only way to deploy the server.<\/p>\n<p>In fact, the <a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side\/manual-setup-guide\">manual setup guide<\/a> gives you the details on how to deploy a Google Tag Manager Server in <em>any<\/em> environment that runs Docker.<\/p>\n<blockquote>\n<p>Docker is a way to wrap an entire application (such as the GTM server) in a <strong>container<\/strong>, which can then be deployed easily with tools offered by most server platforms. <a href=\"https:\/\/docs.docker.com\/get-started\/overview\/\">Read more here<\/a>.<\/p>\n<\/blockquote>\n<p>In this guide, I\u2019ll build on what Mark (brilliantly) wrote about by elaborating on a <strong>Cloud Run<\/strong> installation. To make matters easier, there\u2019s a simple <strong>install script<\/strong> you can use to automate most of the process.<\/p>\n<p>                <span class=\"simmer\"><br \/>\n  <span class=\"close\">X<\/span><\/p>\n<p>\n    <span class=\"fa fa-md fa-bell\"\/><br \/>\n    <strong>The Simmer Newsletter<\/strong>\n  <\/p>\n<p>\n    Subscribe to the <a href=\"https:\/\/www.simoahava.com\/newsletter\/\">Simmer newsletter<\/a> to get the latest news and content from Simo Ahava into your email inbox!\n  <\/p>\n<p>  <\/span><\/p>\n<h2 id=\"tip-130-how-to-deploy-a-gtm-server-using-cloud-run\">Tip #130: How to deploy a GTM Server using Cloud Run<\/h2>\n<div style=\"aspect-ratio: 960 \/ 540;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/setup-google-tag-manager-server-cloud-run.jpg\" title=\"Setup Google Tag Manager Server Using Cloud Run\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"540\" width=\"960\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/setup-google-tag-manager-server-cloud-run.jpg#ZgotmplZ\" alt=\"Setup Google Tag Manager Server Using Cloud Run\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Cloud Run is still <em>fairly<\/em> recent tech, as it entered general availability in late 2019. If Cloud Run had the feature set it has today, it\u2019s likely that it would have been chosen as the native integration in Google Tag Manager instead of App Engine.<\/p>\n<p>Here\u2019s an <strong>App Engine<\/strong> vs. <strong>Cloud Run<\/strong> table I\u2019ve compiled:<\/p>\n<table>\n<thead>\n<tr>\n<th>App Engine<\/th>\n<th>Cloud Run<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Runs on <strong>Compute Engine<\/strong> instances.<\/td>\n<td>Runs on <strong>serverless containers<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td>No scale-to-zero (App Engine Flexible).<\/td>\n<td>Can be configured to only run when servicing requests.<\/td>\n<\/tr>\n<tr>\n<td>Automatically compresses files.<\/td>\n<td>No automatic compression.<\/td>\n<\/tr>\n<tr>\n<td>Adds some additional metadata to HTTP requests.<\/td>\n<td>Doesn\u2019t modify the HTTP requests.<\/td>\n<\/tr>\n<tr>\n<td>(Probably) more efficient for a large number of requests (&gt;100 million \/ month).<\/td>\n<td>(Probably) more efficient for a smaller number of requests (\n<\/td>\n<\/tr>\n<tr>\n<td>Single-region, difficult to load balance.<\/td>\n<td>Can be setup with a multi-region network using a load balancer.<\/td>\n<\/tr>\n<tr>\n<td>Established technology.<\/td>\n<td>Up-and-coming technology.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>As you can see, the decision on which tech to choose is hardly an easy one. If you\u2019re running a <strong>very large number of requests<\/strong>, it seems like App Engine might still have the edge, especially when you\u2019re using <strong>auto-scaling<\/strong> and starting off with an appropriate minimum number of instances.<\/p>\n<p>But if you\u2019re processing a more modest request load and if you don\u2019t specifically need compression out-of-the-box, you might enjoy what Cloud Run brings to the mix.<\/p>\n<h2 id=\"anecdotal-evidence\">Anecdotal evidence<\/h2>\n<p>Anecdotes are rarely useful, but I\u2019ll share them anyway. After switching from App Engine (<strong>3 instances<\/strong>, catering to <strong>~5 million requests per month<\/strong>) to Cloud Run, this is what I found.<\/p>\n<div style=\"aspect-ratio: 3452 \/ 938;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/app-engine-cost.jpg\" title=\"App Engine Cost\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"938\" width=\"3452\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/app-engine-cost.jpg#ZgotmplZ\" alt=\"App Engine Cost\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The daily cost of running three app engine instances (above) is just under <strong>4 euros per day<\/strong>. This is the <em>recommended setup<\/em> of server-side Google Tag Manager.<\/p>\n<p>Yes, I could have trivially scaled down to two or even just one instance to save in expenses, but traffic spikes can come without warning, and the <em>cold boot time<\/em> of an App Engine instance can be unbearably long.<\/p>\n<p>App Engine can also run into <strong>resource exhaustion<\/strong> issues depending on region, where even the minimum number of instances cannot be met.<\/p>\n<div style=\"aspect-ratio: 3442 \/ 962;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/cloud-run-cost.jpg\" title=\"Cloud Run Cost\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"962\" width=\"3442\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/cloud-run-cost.jpg#ZgotmplZ\" alt=\"Cloud Run Cost\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>With on-demand Cloud Run the cost varies from day-to-day, but on an average week I am paying <strong>under 1 euro per day<\/strong>, so even less than what I would pay for a <strong>single instance App Engine setup<\/strong> (which would be risky in case of traffic spikes and the long cold boot time of App Engine instances).<\/p>\n<p>As for latency, here\u2019s what Cloud Run shows:<\/p>\n<div style=\"aspect-ratio: 1676 \/ 414;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/cloud-run-latencies.jpg\" title=\"Cloud Run Latencies\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"414\" width=\"1676\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/cloud-run-latencies.jpg#ZgotmplZ\" alt=\"Cloud Run Latencies\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>The corresponding values for App Engine were (taken from an arbitrary 5-day sample):<\/p>\n<ul>\n<li>50th percentile: <strong>0.44s<\/strong><\/li>\n<li>95th percentile: <strong>0.87s<\/strong><\/li>\n<li>99th percentile: <strong>1.13s<\/strong><\/li>\n<\/ul>\n<p>I\u2019m not sure why Cloud Run has better latency, considering it <strong>doesn\u2019t compress files automatically<\/strong>, so <code>gtm.js<\/code> (Google Tag Manager) and <code>gtag.js<\/code> (Global Site Tag), for example, are sent fully uncompressed over the network.<\/p>\n<p>I am of course happy with these results, but I\u2019ll need more data before I can draw further conclusions.<\/p>\n<p>And, again, the site in question has very modest traffic (just around <strong>five million requests<\/strong> per month). It would be interesting to see comparison data from different cohorts: dozens of millions of monthly requests, hundreds of millions of monthly requests, billions of monthly requests\u2026<\/p>\n<h2 id=\"how-to-deploy-cloud-run\">How to deploy Cloud Run<\/h2>\n<p>If you want to give Cloud Run a go, it\u2019s very easy to do so. You need a <strong>Google Cloud Project<\/strong> where billing has been enabled.<\/p>\n<p>In the project, fire up <strong>Cloud Shell<\/strong> by clicking the corresponding icon in the navigation bar.<\/p>\n<div style=\"aspect-ratio: 962 \/ 256;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/cloud-shell.jpg\" title=\"Cloud Shell\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"256\" width=\"962\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/cloud-shell.jpg#ZgotmplZ\" alt=\"Cloud Shell\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Once the shell instance has started, run the following command:<\/p>\n<div class=\"highlight\">\n<pre style=\"background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-shell\" data-lang=\"shell\">bash -c <span style=\"color:#a50\">\"<\/span><span style=\"color:#00a\">$(<\/span>curl -fsSL https:\/\/raw.githubusercontent.com\/sahava\/sgtm-cloud-run-shell\/main\/cr-script.sh<span style=\"color:#00a\">)<\/span><span style=\"color:#a50\">\"<\/span><\/code><\/pre>\n<\/div>\n<p>This executes a <a href=\"https:\/\/github.com\/sahava\/sgtm-cloud-run-shell\">shell script I\u2019ve written<\/a> that walks you through the deployment steps.<\/p>\n<ul>\n<li><strong>Service Name<\/strong> \u2013\u00a0this is what the Cloud Run service will be called, with suffixes <code>-debug<\/code> for the debug service and <code>-prod<\/code> for the tagging service automatically added by the script. Choose whatever you like or use the recommended <code>gtm-server<\/code> by pressing enter.<\/li>\n<li><strong>Fetch existing service configuration<\/strong> \u2013\u00a0if you\u2019ve already deployed a Cloud Run service, you can use this to fetch the existing configuration details from the region you\u2019ll select next. This is helpful as it prefills all the subsequent settings in the shell script. You can skip this step by pressing enter.<\/li>\n<li><strong>Container Config<\/strong> &#8211; copy-paste the <strong>container config string<\/strong> from the Google Tag Manager Server container user interface by clicking the container ID in the top bar.<\/li>\n<\/ul>\n<div style=\"aspect-ratio: 1596 \/ 1162;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/gtm-container-config.jpg\" title=\"GTM Container config\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1162\" width=\"1596\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/gtm-container-config.jpg#ZgotmplZ\" alt=\"GTM Container config\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<ul>\n<li><strong>Policy Script URL<\/strong> &#8211; if you want to use a <a href=\"https:\/\/developers.google.com\/tag-platform\/tag-manager\/server-side\/configure-a-policy\">policy script<\/a> to control what a server container can do, you can add the URL to the script here.<\/li>\n<li><strong>Memory per instance<\/strong> &#8211; choose how much memory is reserved per Cloud Run instance. Use the recommended <strong>512Mi<\/strong> to mirror what an App Engine deployment would use.<\/li>\n<li><strong>CPU allocation per instance<\/strong> &#8211; choose how many CPUs are allocated per instance.<\/li>\n<li><strong>Minimum number of servers<\/strong> &#8211; choose how many instances to scale up to by default.<\/li>\n<li><strong>Maximum number of instances<\/strong> &#8211; choose the limit of how many instances the deployment can scale up to.<\/li>\n<\/ul>\n<div style=\"aspect-ratio: 1340 \/ 296;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/sample-config.jpg\" title=\"Sample config\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"296\" width=\"1340\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/sample-config.jpg#ZgotmplZ\" alt=\"Sample config\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>When you\u2019re done, this is what you should see. If you\u2019re happy with the setup, just type <code>y<\/code> and press enter to proceed.<\/p>\n<blockquote>\n<p>If you haven\u2019t enabled the Cloud Run API yet, at this point the script will do so for you.<\/p>\n<\/blockquote>\n<p>Each Server container runs on two services: a <strong>debug service<\/strong> and a <strong>tagging service<\/strong> (called <em>production service<\/em> in the script). The debug service is solely used for Preview mode, and runs on very limited capacity. The tagging service is the one you configured in the steps above.<\/p>\n<h3 id=\"deploy-the-debug-service\">Deploy the debug service<\/h3>\n<p>The first thing you\u2019ll need to choose is the <strong>region for the debug service<\/strong>.<\/p>\n<p><strong>You should choose a region that\u2019s geographically closest to the people who will be doing the debugging<\/strong>. As I\u2019m from Finland, I\u2019ll choose the <code>europe-north1<\/code> region for the debug service.<\/p>\n<p>Once you\u2019ve chosen the region, it\u2019s going to take a moment for the service to deploy.<\/p>\n<div style=\"aspect-ratio: 1938 \/ 418;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/debug-service-done.jpg\" title=\"Debug service done\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"418\" width=\"1938\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/debug-service-done.jpg#ZgotmplZ\" alt=\"Debug service done\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>After deployment is complete, you should see a message like the one above. Press any key to proceed to deploy the tagging service.<\/p>\n<h3 id=\"deploy-the-tagging-service\">Deploy the tagging service<\/h3>\n<p>You\u2019ll need to choose a region for the tagging service, too. This time, select a region that\u2019s closest to where the bulk of your visitors visit from (see more about multi-region setups below).<\/p>\n<blockquote>\n<p><strong>NOTE!<\/strong> If you want to map a custom domain to the tagging service, as you should, do note that custom domain mappings are available in only a <a href=\"https:\/\/cloud.google.com\/run\/docs\/mapping-custom-domains#run\">limited set of regions<\/a>.<\/p>\n<\/blockquote>\n<p>By reducing the geographical distance between the machines that send the requests and your server that processes the requests, you\u2019ll also minimize the cost of <strong>network egress<\/strong> that your service will need to process.<\/p>\n<blockquote>\n<p>This does <em>not<\/em> need to be the same region as what you chose for the debug service!<\/p>\n<\/blockquote>\n<p>As the bulk of my visitors come from the US, I\u2019ve chosen <code>us-central1<\/code> as the region of my tagging service.<\/p>\n<div style=\"aspect-ratio: 1900 \/ 436;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/click-link.jpg\" title=\"Click link\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"436\" width=\"1900\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/click-link.jpg#ZgotmplZ\" alt=\"Click link\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Once done, you should see a screen like the one above. Click the link that ends with <code>\/healthy<\/code> to see if your new service works. You should see a new page that simply has the message <code>ok<\/code> written on it.<\/p>\n<div style=\"aspect-ratio: 1126 \/ 186;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/ok-message.jpg\" title=\"OK message\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"186\" width=\"1126\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/ok-message.jpg#ZgotmplZ\" alt=\"OK message\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Congratulations! You\u2019ve setup a simple Cloud Run deployment that has one debug service and one production service.<\/p>\n<p><a href=\"https:\/\/cloud.google.com\/run\/docs\/mapping-custom-domains\">You can now map a <strong>custom domain to the service<\/strong><\/a>. Note that you map the custom domain only to the <strong>tagging service<\/strong>. You will never need to directly access the <strong>debug service<\/strong> URL, as the tagging service automatically redirects requests sent in Preview mode to the debug service.<\/p>\n<h2 id=\"a-few-words-on-multi-region-setups\">A few words on multi-region setups<\/h2>\n<p>The cool thing about Cloud Run is that you can create a number of <strong>tagging servers<\/strong>, each setup in a different region, and then add a <strong>load balancer<\/strong> in front of them that distributes the traffic automatically to the closest server region to where the request is coming from.<\/p>\n<blockquote>\n<p><strong>Note!<\/strong> You\u2019ll only need one single debug service, though. All the tagging services can be configured to point to this one debug service. This is not currently supported by the shell script, but it\u2019s a feature I\u2019m going to add to it in the near future.<\/p>\n<\/blockquote>\n<div style=\"aspect-ratio: 1716 \/ 1506;\" class=\"figure nocaption\">\n<p>    <a href=\"https:\/\/www.simoahava.com\/images\/2022\/02\/load-balancer.jpg\" title=\"Load Balancer\"><\/p>\n<p>    <img decoding=\"async\" class=\"fig-img\" height=\"1506\" width=\"1716\" loading=\"lazy\" src=\"https:\/\/www.simoahava.com\/images\/2022\/02\/load-balancer.jpg#ZgotmplZ\" alt=\"Load Balancer\"\/><\/p>\n<p>    <\/a><\/p>\n<\/div>\n<p>Setting up the load balancer is beyond the scope of this article, but I will definitely write a guide on how to do this in the future.<\/p>\n<p>For the time being, you can check out the <a href=\"https:\/\/cloud.google.com\/run\/docs\/multiple-regions\">official documentation for a step-by-step<\/a>.<\/p>\n<h2 id=\"summary\">Summary<\/h2>\n<p>Jumping on Cloud Run isn\u2019t something I\u2019d unconditionally recommend to everyone using server-side Google Tag Manager.<\/p>\n<p>It still has unpolished edges, there are issues with general availability of some features, and measures to reduce latency (such as compression of files) require a lot of manual work.<\/p>\n<p>Having said that, the general <em>idea<\/em> of Cloud Run makes so much more sense than App Engine does. App Engine relies on <strong>virtual machines<\/strong> reserved for use in Google Cloud.<\/p>\n<p>These machines are in use whether or not they serve requests. This means that at any given time you are most likely running <strong>a lot of overhead<\/strong> in your setup and, in essence, paying for nothing.<\/p>\n<p>With Cloud Run, you can setup your deployment to only run when it actually serves requests. The per-request cost is slightly more than an \u201calways on\u201d deployment, but if you have wild fluctuation in your traffic your overall cost might still be smaller.<\/p>\n<p>Additionally, Cloud Run is the new, shiny thing in the Google Cloud Platform. It\u2019s plausible that Google will put a lot of effort into developing it to replace some of App Engine\u2019s use cases.<\/p>\n<p>For now, being able to smoothly run <strong>multi-region<\/strong> deployments and to <strong>having more control over how requests are serviced<\/strong> by your cloud infrastructure might be enough to persuade enterprise customers to look into Cloud Run as the next development step of their server-side Google Tag Manager deployments.<\/p>\n<p>Have you tried Cloud Run yet with server-side Google Tag Manager? What\u2019s your experience been like?<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>While Google App Engine, the default implementation pattern of server-side Google Tag Manager, is straightforward to setup with the automatic provisioning steps, it\u2019s certainly not the only way to deploy the server. In fact, the manual setup guide gives you the details on how to deploy a Google Tag Manager Server in any environment that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":64084,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[12564,1531,14492,14495,2753,11062,7003,1791],"dealstore":[],"offerexpiration":[],"class_list":["post-64083","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-cloud","tag-google","tag-gtmtips","tag-manager","tag-run","tag-server","tag-setup","tag-tag"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>#GTMTips: Setup A Google Tag Manager Server Using Cloud Run - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=64083\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"While Google App Engine, the default implementation pattern of server-side Google Tag Manager, is straightforward to setup with the automatic provisioning steps, it\u2019s certainly not the only way to deploy the server. In fact, the manual setup guide gives you the details on how to deploy a Google Tag Manager Server in any environment that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=64083\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-02T10:05:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=64083#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=64083\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run\",\"datePublished\":\"2025-02-02T10:05:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=64083\"},\"wordCount\":1826,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=64083#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg\",\"keywords\":[\"Cloud\",\"Google\",\"GTMTips\",\"Manager\",\"Run\",\"Server\",\"Setup\",\"TAG\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=64083#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=64083\",\"url\":\"https:\/\/fivemor.com\/?p=64083\",\"name\":\"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=64083#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=64083#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg\",\"datePublished\":\"2025-02-02T10:05:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=64083#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=64083\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=64083#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=64083#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=64083","og_locale":"en_US","og_type":"article","og_title":"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run - Som2ny Network","og_description":"While Google App Engine, the default implementation pattern of server-side Google Tag Manager, is straightforward to setup with the automatic provisioning steps, it\u2019s certainly not the only way to deploy the server. In fact, the manual setup guide gives you the details on how to deploy a Google Tag Manager Server in any environment that [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=64083","og_site_name":"Som2ny Network","article_published_time":"2025-02-02T10:05:31+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=64083#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=64083"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run","datePublished":"2025-02-02T10:05:31+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=64083"},"wordCount":1826,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=64083#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg","keywords":["Cloud","Google","GTMTips","Manager","Run","Server","Setup","TAG"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=64083#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=64083","url":"https:\/\/fivemor.com\/?p=64083","name":"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=64083#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=64083#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg","datePublished":"2025-02-02T10:05:31+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=64083#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=64083"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=64083#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/02\/setup-google-tag-manager-server-cloud-run.jpg","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=64083#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"#GTMTips: Setup A Google Tag Manager Server Using Cloud Run"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/64083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=64083"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/64083\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/64084"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=64083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=64083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=64083"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=64083"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=64083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}