Skip to content

Setup Usercentrics sGTM Container

Set up your Usercentrics sGTM container so you can start receiving visitor data.

In this step you will:

  1. Create a Usercentrics Server-Side Tagging account
  2. Create your first sGTM Container
  3. Connect a domain, like metrics.yourwebsite.com, where you receive data.
  4. Setup DNS for your container
  5. Configure your sGTM container to use your new domain name
  6. Have your website communicate with your sGTM server

Go to Server-Side Tagging by Usercentrics.

Beta customer, skip to Create Container

Directions to Create our first sGTM Container

1. Create a new Server-Side Tagging account at the Usercentrics account page.

Create new sGTM account at Usercentrics account page. Step 1 screenshot

Under "Set up your account" - "Company Name" - enter your company name Step 2 screenshot

Under "Set up your account" - "Company Website" - enter your website URL Step 3 screenshot

Enter your company's address Step 4 screenshot

Click "Continue" Step 5 screenshot

You'll see the Usercentrics - "Create your first Server-Side Tagging container" page

This is where you are creating the Usercentrics Server-Side Tagging container

Step 6 screenshot

Under "Container Name" We suggest you name your container something similar to your business name. Step 7 screenshot

2. Create your first sGTM Container

Under "Container Config" enter your Google Tag Manager config ID that copied earlier from GTM.

To obtain your Container Config ID

Directions to Obtain your Container Config from GTM

Step 8 screenshot

Under "Server Location," using the drop-down menu, select appropriate location Step 9 screenshot

Note, you also have the option to "Skip for now" which allows you to setup your container later. Step 10 screenshot

Once you have entered your "Container Config" and pressed the "Create Container" button, you have now successfully you will be directed to the "Usercentrics - Containers" page.

Note: This is the main Usercentrics - Containers page (continue below)

From this main "Usercentrics - Containers" page, you can create containers in the future, as well as additional containers. Step 11 screenshot

On your Container's detail page, a green checkmark indicates initial setup is "Active"

3. Connect a custom domain, such as metrics.yourwebsite.com, where you collect data.

Scroll down and click "Add domain" Step 14 screenshot

Under "Domains" - enter the domain where you would like to send your metrics traffic.

Note

  • You are now telling your sGTM Container where to send data.
  • We suggest a domain like "metrics"
  • So you might enter something like metrics.yourwebsite.com, but one that reflects your own container domain.
  • Remember this domain, as you will need it for the next step.

Send data to any domain you would like, to properly reflect where you would like to access your sGTM server.

As examples:

  • sst.JillPetSupplies.com
  • analytics.TheSkiShop.com
  • dataconnection.EnergySavingTips.com
    (anywhere that reflects your own container domain)

Step 15 screenshot

Click "Add domain" Step 16 screenshot

Press the "Add Domain" button. It will generate the blue "Pending" info box Step 17 screenshot

Copy

To create CNAME Record, copy "Host" and "Value" for the next step.

4. Setup DNS for your container

In a new tab or window, go to your own domain registrar (eg. IONOS, Gandi, OVHcloud, NameCheap, CloudFlare, etc.) to update your DNS record

Depending on your Domain Provider, you can reference one of the following articles to create a CNAME:

Provider Support Page Link
IONOS Creating a CNAME record on IONOS
OVHcloud Creating a CNAME record to add an associated domain
Infomaniak Manage CNAME & DNAME records
Openprovider DNS Records - Openprovider
Namecheap How to Create a CNAME Record For Your Domain
Netlify Custom domains
GoDaddy Add a CNAME record
Wix Managing DNS Records in Your Wix Account
WordPress.com Manage Your Domain's DNS Records
Cloudflare Create DNS records

These are the examples provided. If your Domain Provider is not listed, please search your provider's website support pages for "How to setup a CNAME Record?"

EXAMPLE in Netlify (do similar at your domain provider.)

You must do this AT YOUR OWN DNS PROVIDER

Step 18 screenshot

Click "Add new record" or your domain registrar's equivalent Step 19 screenshot

Create a new DNS record using Usercentrics Domains page info Step 20 screenshot

You should see the new DNS record on your domain registrar Step 21 screenshot

Return to Server Side Tagging | Usercentrics

(click back into the details page of the container, if you are at the main page).

Click "Refresh status" Step 22 screenshot

Your domain should now be "Active". If it’s not, it might take a few hours, depending on your DNS provider. Step 23 screenshot

You'll see "Container status" is Active. Step 24 screenshot

Under "Domain status," the status should be green/"Active" Step 25 screenshot

5. Update your sGTM container to use your custom domain name

Return to Google Tag Manager Return to Google Tag Manager

You should already have a "Server Container" set up.

If not, go back to instructions "Create a Server Container in GTM"

Select your Server Container

Step 26 screenshot

Click on the three dots next to the Server Container Step 27 screenshot

Under "Container Settings" - Click "Add URL"

Add your metrics link:

  • note: begin with https://
  • eg: https://metrics.yourwebsite.com (update this to reflect the one you created as your container domain, and where you set the DNS CNAME Record).

Step 28 screenshot

Step 29 screenshot

Click "Save" Step 30 screenshot

6. Have your website communicate with your sGTM server

Back in your website code, add another <script>

In your site, add this <script> tag:

<script src="https://[YOUR_CONTAINER_DOMAIN]/uc-consent-signals.js"></script>
For example:
<script src="https://metrics.yourwebsite.com/uc-consent-signals.js"></script>
(update this to reflect the one you created as your container domain)

Place this <script> ABOVE your CMP <script>

Step 30 screenshot And, put as high as possible inside the <head> tag.

Save your code changes, and deploy your website.

Ensure new <script> is arriving at your website

Once changes are live, press refresh and make sure that new <script> is in the <head>

You are now ready to go to Google Analytics & Measurement ID