How to setup GTM Server Container Hosting?

We only host server containers under custom domains. Thus, having a domain, configured DNS and access to the DNS settings is required to complete this guide.

1. Prepare Google Tag Manager

First make sure we have new or existing GTM Container that have "server" set as the Target platform during creation:

Right after creation (or in the Admin, Settings and Install Google Tag Manager section) select "Manually provision tagging server" and copy the Container Config string.

This string contains everything that is needed to connect your hosting with this GTM container:

2. Provision Server Container Hosting

Now, let's switch to our platform to provision server container hosting. You can create your account with 7 days free trial from this screen:

Once your account is created you can access it here:

and log in using the email address provided during trial account creation:

Then navigate to Server Container in top nav and click Create Server Container button.

In the modal fill in all fields:

  1. Hostname - type in your an URL for your server container, it needs to be subdomain in your main domain. The first part of address is something that you can freely adjust, it can be "metrics", "gtm", "events", "analytics" etc.
  2. Container Configuration - paste the string copied in the Step 1. above
  3. Region - select the region that is closest to your users' location and/or which is a legal requirement
  4. Size - select BASE which means the server container will get 3 server processes and will scale to handle the traffic.

When ready click "Create Container" button:

3. Configure DNS

After the server is provisioned it will appear on the list. When it's available click "setup" button next to it to continue:

Click "DNS Setup" to reveal details of DNS settings that needs to be added in your domain configuration:

The exact step needed here will depend on your DNS hosting. This is how it will look in CloudFlare:

Save the new CNAME record. New DNS settings make take a while to have an effect.

4. Container Settings

Once the DNS settings will go live the server container will be accessible and you will be able to finalize the settings. Navigate back to GTM Admin section and select Container Settings:

Click "Add URL" and paste your new server container subdomain adding "https://" in front of it. It will tell GTM where your server container is hosted and will enable preview mode, when URL is added Save it:

You can start configuring your new GTM server container. For instance you can import any of the server-side presets our hosting offers.

5. (Optionally) Install Server GTM Presets

In order to quickly provision end-to-end integrations for most popular platforms, we have prepared a set of GTM presets that can be imported into server GTM container. These presets are configured for eCommerce use-case, but can be adapted for other needs.

6. GTM Snippets Installation

When you are ready configuring both of your web and server containers you can install it on your website. In order to get GTM served from your subdomain you need to use modified GTM installation snippets. You can find them on our platform clicking again "setup" button next to the container and selecting "GTM Snippets".

In order to generate the Snippets you need to provide your Web GTM Container ID. This is the classic GTM container that will load into the browser, track events and send them to Server GTM container.

You can use our ready GTM Preset to configure your Web GTM container.

You can copy and paste those two snippets into appropriate place:

  1. Our GTM for WooCommerce plugin settings
  2. Directly into your theme code
  3. Into settings of your Cookie Banner or Consent Management Platform widget
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.