Guide

How To Configure DNS For Server Side Container

This is the second part of configuring your server side container. Before completing this guide, be sure you’ve completed the steps in creating your server side container.

This guide goes through every step required to:

  1. Create custom subdomain for your server side data collection
  2. Assign your unique subdomain to your server side container
  3. Verify the subdomain is working as expected

Before getting started you will want to have the following:

  1. A verified domain that your email has been added to. Typically this is your primary website URL that is verified in Google Search Console. 
  2. Access to your DNS registrar (e.g. GoDaddy, Cloudflare, Network Solutions, etc.)

Remember – as we covered in the overview on server side tag management with GTM, you get data to your server side container by sending requests to a unique URL. And you want that unique URL to be a subdomain of your primary website URL so your server side tagging is done in 1st party context. 

This video shows how to configure your DNS starting at 2 minute mark.

Step 1: Google Cloud Landing Page

Go to your server side container in GTM.

Then click your GTM Container ID on the top right corner of the screen.

Inside the modal that contains your server information, click on the “Google Cloud Platform ID” link which will bring you to your Google Cloud account.

google-cloud-landing-page

Step 2: Navigate To Your App Engine

In this step you’ll need to click the hamburger menu and go to App Engine > Dashboard as shown below. 

gotoapp-engine

Step 3: Select Your App Engine

Depending on how many app engine instances you have you might need to click on the App Engine dropdown menu in the top navigation bar (starts with GTM in the screenshot below).

Then click in the “All” tab to see all of your server instances. Select the GTM container ID that you want to setup. 

If this is your first time then you should only see one available. 

select-gtm-app-engine

Step 4: Go To App Engine Settings

Now you are viewing the details of your App Engine and we need to create your custom subdomain. Go to Settings > Custom Domain.

go to app settings

Step 5: Verify Your Domain

Now it’s time to connect your domain! In the custom domain tab you’ll need to select a domain that you already have verified OR verify a new domain. 

verify-new-domain

If you have not verified a domain yet then enter the primary domain name you want to use (e.g. I set “https://www.getelevar.com” in this step for me). 

If your email address is already a verified user of this domain in Google Search Console then you won’t need to do anything else and Google will verify your user.

webmaster tools

Here are my domains from Google Search Console:

webmaster tool URLs

If your domain is not listed here then you’ll need to add and verify a new property in Search Console before continuing. 

Now – this step can get confusing and frustrating. Some common issues we see in this step are:

  • The email you are logged into Google Cloud is not the same email that has Search Console access. In this case you can either verify this email with search console or add your email to search console.
  • Search console isn’t verified at all. If this is the case then go the TXT record route when verifying (which the Google verification will walk through)
  • If you do verify then you might need to way 20-30 minutes for Google Cloud to update. Refresh the page if needed.

Step 6: Continue With Verified Domain

Once you’ve verified your domain then click continue on your domain like the below:

select domain

This is a very important step. When you click continue from above you are going to be shown a similar screen as shown below.

gtm-ss-container-delete-primary-domains

By default Google is going to show your primary domain and www domain to “connect”.

YOU DO NOT WANT TO CONNECT THESE.

Sorry for the caps – but it’s that important.

X out the defaults they show you here.

The only domain you need to continue with is your subdomain that you’ll be using for your SS container.

Some examples we see used here:

  • ssapi.domain.com
  • marketing.domain.com
  • api.domain.com

The subdomain (in bold) can be anything you want. Just don’t use your primary domain here.

Step 7: Create Subdomain URL

In this step you’ll add your custom subdomain which will be your server URL. 

For example if I added getelevar.com as my verified domain name in the previous step and I wanted my subdomain to be “collect.getelevar.com” then I would enter “collect.getelevar.com” in the field shown below. 

We recommend creating something unique for your business (i.e. don’t use collect). 

*very important* – DO NOT USE WWW OR YOUR PRIMARY DOMAIN HERE! THIS WILL BREAK YOUR WEBSITE.

create-subdomain

Step 8: Continue With Subdomain

Once you’ve saved your subdomain mapping in the previous step then you should see a green checkmark confirming your new subdomain for your server side container. 

continue-with-domain

Step 9: Update DNS Records

You aren’t quite done with the subdomain setup yet. In this next step you will be prompted with DNS records that you’ll have to add to your DNS registrar. 

update-dns-records

We did not have to setup the CNAME during our configurations so if you receive an error in your DNS settings for this then skip it. 

Here are what your DNS settings will look like (note the values/IP addresses will be different for you):

example cloudflare settings

Step 10: Verifying Your Domain DNS

After you’ve entered your DNS entries from the previous step into your DNS settings click “Done” as shown in the previous step. You’ll then be taken to the screen shown below where Google is verifying your DNS records and creating an SSL certificate for your URL.

domain-verifying

This could take an hour so don’t wait around. Come back to this screen in a few hours. 

Step 11: Domain Confirmation

If your DNS was confirmed then you’ll see the screen below for “collect.getelevar.com”. 

domain-listings

However if there was an error in verifying your subdomain then you’ll get the yellow warning flag. If this is the case for you then double check your DNS settings were set up accurately. 

That’s it! You have successfully created your server side container and connected it to your own custom URL. 

Next up – configure a data layer for your Shopify store that you can use with your server side container.

(“Elevar”) is strongly committed to protecting and respecting your privacy rights.