Google Tag Manager - Creating a Server Container

Google Tag Manager - Creating a Server Container

A Google Tag Manager server container allows measurement code to be run separately from your website using Google Cloud’s infrastructure. It offers several advantages over site tags.

  • Cookies: Provides an alternative to third-party cookies and platforms that don’t allow client-side measurement.
  • Improved performance: Some measurement tags on your website can be migrated to a server container instead of running on the client side, which could speed up page load time.
  • Better security: Your client’s data is more secure when collected and sent in a server-side environment.

Create a Tag Manager server container

To use server-side tagging, create a new Tag Manager server container:

  1. Go to tagmanager.google.com and login with your Google user.
  2. Click next to the correct account name.
  3. Choose Create Container.
image-1-1
  1. Under Container name enter “www.yourwebsite.com - Server Container".
  2. Under Target platform, choose Server.
  3. Click Create.
image-2
  1. A dialogue to set up your tagging server titled Install Google Tag Manager will appear.
  2. Click Automatically provision your tagging server.
  3. A dialogue titled Create tagging server will appear.
  4. Select a billing account and click Select billing account and create server. If you do not have a billing account, skip to the Creating a Google Cloud billing account section below.
  5. Wait for the “Stand by while your server is created. This may take a few minutes.” dialogue to finish.
  6. On the Server Created dialogue, click Close.

Creating a Google Cloud billing account

  1. Click Create a billing account. A tagging server should fall under the free tier of Google Cloud services unless your organization is already using Google Cloud for other services or in the event that your website receives a large amount of traffic.
  2. In the Name field, enter an identifiable name such as “TD Visa”.
  3. Select the correct Country to be billed in that country’s currency.
  4. Click Continue.
image-3
  1. Fill out the Set up your billing profile page and click Submit and enable billing.
  2. Return to tagmanager.google.com.
  3. Click next to your server container and select Container Settings.
image-4-1
  1. Click Set up your tagging server.
  2. Click Automatically provision your tagging server.
  3. A dialogue titled Create tagging server will appear.
  4. Select your newly created billing account and click Select billing account and create server.
  5. Wait for the “Stand by while your server is created. This may take a few minutes.” dialogue to finish.
  6. On the Server Created dialogue, click Close.

Add a Custom Domain to the Server Container

Since ad and tracking blockers may prevent server-side tagging, we suggest using a subdomain for the web server being measured.

  1. Go to https://console.cloud.google.com/welcome
  2. Select the server container project from the dropdown at the top of the screen.
image-5
  1. Click the hamburger menu in the upper left-hand corner And navigate to More Products->App Engine->Settings.
image-6
  1. Got the Custom Domains tab and click Add a custom domain.
  2. Select the website being measured’s domain. If it is not in the dropdown, please jump to the Verify a New Domain section below.
  3. Enter the custom subdomain for the server container and click Save Mappings. <imajery> suggests using metrics for the name but anything unique will work.
image-7
  1. Let the subdomain save and then click Continue.
  2. Add the listed records to the domain’s DNS.
  3. Once that is complete click Done. Google will then create an automatic SSL certificate within 60 minutes.
  4. Return to Google Tag Manager and Click next to the server container.
  5. Select Continer Settings in the dropdown
image-8
  1. Click Add URL and enter your newly created subdomain including https://
image-9
  1. Click Save in the upper right-hand corner.

Verify a New Domain

  1. Select Verify a new domain from the dropdown menu.
  2. Enter the website being measured’s domain and click Verify
image-10
  1. In the new tab, follow the instructions to verify the domain. For more details, please visit Google’s support article Verify your site ownership
  2. Return to the Google Cloud tab and continue the steps for adding a custom domain to the server container.

Author

Jay Sala
Founder

Interested in working with Us?
We'd love to hear from you!

  • This field is for validation purposes and should be left unchanged.