Setup Usercentrics sGTM Container
Set up your Usercentrics sGTM container so you can start receiving visitor data.¶
In this step you will:
- Create a Usercentrics Server-Side Tagging account
- Create your first sGTM Container
- Connect a domain, like metrics.yourwebsite.com, where you receive data.
- Setup DNS for your container
- Configure your sGTM container to use your new domain name
- 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.
Under "Set up your account" - "Company Name" - enter your company name
Under "Set up your account" - "Company Website" - enter your website URL
Enter your company's address
Click "Continue"
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
Under "Container Name" We suggest you name your container something similar to your business name.
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
Under "Server Location," using the drop-down menu, select appropriate location
Note, you also have the option to "Skip for now" which allows you to setup your container later.
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.
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"
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)
Click "Add domain"
Press the "Add Domain" button. It will generate the blue "Pending" info box
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
Click "Add new record" or your domain registrar's equivalent
Create a new DNS record using Usercentrics Domains page info
You should see the new DNS record on your domain registrar
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"
Your domain should now be "Active". If it’s not, it might take a few hours, depending on your DNS provider.
You'll see "Container status" is Active.
Under "Domain status," the status should be green/"Active"
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
Click on the three dots next to the Server Container
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).
Click "Save"
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>
<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>
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>