# Setting Up Google Tag Manager Server-Side Conversion Webhook

> The Google Tag Manager Server-Side integration sends conversion events to your GTM server container, enabling server-side tracking.

Source: https://callgrid.com/knowledge-base/setting-up-google-tag-manager-server-side-conversion-webhook
Last updated: 2025-09-24
Topics: Integrations, Conversion Pixel

The Google Tag Manager Server-Side integration sends conversion events to your GTM server container, enabling server-side tracking that improves data accuracy and reduces client-side code load on your website.

## Prerequisites

Before setting up your webhook, you'll need:

- An active Google Cloud Platform account with billing enabled
- A Google Tag Manager server container deployed and running
- Your GTM server container API secret
- Your Google Analytics Measurement ID (G-XXXXXXXXX format)

## Setup Process

### 1. Get Required Credentials

**Find Your Server Container Details:**

1. Go to Google Tag Manager
2. Select your server container workspace
3. Navigate to Admin > Container Settings
4. Copy the Server Container URL and note the region

**Generate API Secret:**

1. In your server container, go to Admin
2. Find the API secret in container settings
3. Copy the secret for webhook configuration

### 2. Create New Webhook

1. Navigate to **Integrations** → **Webhooks**
2. Click **+ New Webhook**
3. Select **Conversion Pixel** template type
4. Choose **Google Tag Manager** from the dropdown

### 3. Basic Configuration

![](https://callgrid.com/api/media/file/GoogleTemplate-1.png)

1. **Server Region**: Select your GTM server region (us, eu, or asia)
2. **API Secret**: Enter your GTM server container API secret
3. **Measurement ID**: Enter your Google Analytics Measurement ID
4. **Name**: Give your webhook a name
5. **Event**: Select **Call Completed**
6. Click **Save Webhook**

### 4. Advanced Options (Optional)

After saving, you can configure additional settings:

![](https://callgrid.com/api/media/file/GoogleConfig.png)

**Dynamic Variables** The system automatically maps call data to server-side event parameters:

- VisitorIpAddress maps to client_id for user identification
- InboundNumber maps to user_id parameter
- CallId maps to transaction_id for conversion tracking
- CallRevenue maps to purchase value and item pricing
- UTCUnixTime maps to timestamp_micros for accurate timing

**Request Structure** The webhook sends Purchase events with:

- User identification data (client_id, user_id)
- Event timing information
- Transaction details including currency and value
- Item-level data for ecommerce tracking

**Filtering**

![](https://callgrid.com/api/media/file/GoogleFilter.png)

- Add filters using any system tag (InboundState, BuyerName, CampaignName, etc.)
- Use **Equals** conditions to control when events fire
- Combine conditions with **Add Or Rule** or **Add And Rule**

**Testing**

![](https://callgrid.com/api/media/file/GoogleTesting.png)

- Fill in test values for detected variables
- Click **Run Webhook** to verify the integration
- Check your GTM server container preview mode to confirm data receipt

## Best Practices

- Ensure your server container is properly deployed and accessible
- Use consistent client_id values for accurate user tracking
- Configure appropriate triggers in your server container to handle incoming events
- Monitor server container performance and costs in Google Cloud Platform
- Test thoroughly before deploying to production campaigns

## Troubleshooting

- Verify your API secret and server region are correctly configured
- Check that your server container is running and accessible
- Ensure your Google Analytics Measurement ID is valid and active
- Monitor server container logs in GCP for any error messages
- Use GTM preview mode to validate incoming event data structure

The integration enables you to move conversion tracking from client-side to server-side, improving data accuracy while reducing the tracking load on user browsers and providing more reliable measurement data.
