Server-Side Google Tag Manager
Set up and configure Server-side Google Tag Manager with Hardal
Overview
Server-side Google Tag Manager (sGTM) integration with Hardal enables you to process and route your analytics data through your GTM server container, providing better control over data collection and improved performance.
Prerequisites
Before setting up server-side GTM, ensure you have:
- Access to Google Tag Manager
- Access to your Hardal dashboard
- Your GTM server container’s Config Key (which we’ll set up below)
Setting up a custom domain for your sGTM container is recommended for better data ownership and reliability.
Create Server Container
Before you can configure sGTM with Hardal, you need to create a server container in Google Tag Manager.
Access Google Tag Manager
- Go to Google Tag Manager
- Sign in with your Google account
Create New Container
- Select your GTM account (or create one if needed)
- Click the “Create Container” button in the top right
- Enter a descriptive name for your container (e.g., “Hardal Server Container”)
- Select “Server” as the target platform
- Click “Create”
- A pop-up window will show up and your config key will be visible
You don’t need to deploy this server container on your own infrastructure. Hardal will provide the server URL for you in later steps.
Finding Your Config Key
If you already have a server container in GTM, follow the below steps to find your Config Key.
Access Server Container
- Log into Google Tag Manager
- Select your server container from the container list
- Ensure you’re viewing the server container (marked with “Server” tag)
Navigate to Admin Settings
- Click the “Admin” button in the top navigation
- Click “Container Settings”
- Click “Set up your tagging server”
- Click “Manually provision tagging server”
- Your Config Key will be visible on pop-up
The Container Config Key is a string of characters unique to your server container. Keep this key secure as it provides access to your container configuration.
Setup Process
Share Your Config Key with Hardal
- Contact your Hardal Account Manager
- Share your Container Config Key
- You will be shortly given access to your Hardal Dashboard
Configure Server Container URL
- Log in to your Hardal Dashboard
- Copy “Tagging URL” from Server-Side Hosts page
- Navigate to your GTM account
- Click the “Admin” button in the top navigation
- Click “Container Settings”
- Click “Add URL” under Server Container URL
- Insert Hardal Tagging URL into this place
- Click save
Verify Setup
- Enable preview mode in your sGTM container
- Check server container logs for incoming events
- Monitor for any error messages
If no error messages shown and you can see use Preview, congratulations! You have succesfully deployed Server-side Google Tag Manager via Hardal. Now you can check other documentation to set up your Server Container with tags, such as GA4 & Meta and Tiktok!