How to set up server-side tracking with Nimbata (sGTM)
Server-side tracking sends Nimbata call events directly from a secure server to Google Analytics 4, bypassing ad-blockers and browser privacy restrictions that would otherwise intercept or drop the data. This guide walks through the full configuration in both Nimbata and Google Tag Manager.
1. Configure Nimbata
Step 1. Open the Google Analytics integration
- Go to Integrations in the left-hand menu.
- Under Tracking Method, select Server-side (sGTM).

Step 2. Enter your sGTM Server URL
- In Google Tag Manager, go to Admin > Container Settings.
- Copy the Server container URL.
- Paste it into the sGTM Server URL field in Nimbata.


Step 3. Enter your Measurement ID
- In Google Analytics 4, go to Admin > Data Streams and select your stream.
- Copy the Measurement ID (format:
G-XXXXXXXXXX). - Paste it into the Measurement ID field in Nimbata.
2. Create the GA4 Measurement Protocol client in sGTM
This client is the entry point for Nimbata's server-side requests into your sGTM container.
Step 4. Create a new client
- In Google Tag Manager, go to Clients and click New.
- Set the client type to Measurement Protocol (GA4).
Step 5. Set the Activation Path
- Add an Activation Path (for example:
/nimbata). - Copy the value.
- Paste it into the sGTM Activation Path field in Nimbata.

Your Nimbata setup should now look like this:

3. Create the fpid transformation
This transformation adds a first-party client ID to incoming events, ensuring accurate user stitching across sessions.
Step 6. Add a new transformation
- In your sGTM container, go to Transformations and click New.
- Configure it as follows:
Field | Value |
|---|---|
Transformation Name | |
Transformation Type | Augment event |
Name | |
Value | |
Matching condition | |

4. Create a custom variable template
Before creating your variables, you need a custom template to cleanly extract the real visitor IP from the X-Forwarded-For header.
Step 7. Create the template
- In Google Tag Manager, go to Templates and click New Variable Template.
- Name it:
Clean X-Forwarded-For. - Add a field named
headerValue. - Paste the following into the code editor:
const headerValue = data.headerValue;
if (!headerValue) {
return undefined;
}
let raw = headerValue.trim();
if (!raw) {
return undefined;
}
let first = raw.split(',')[0];
if (!first) {
return undefined;
}
first = first.trim();
if (first.charAt(0) === '[') {
const closingBracket = first.indexOf(']');
if (closingBracket > 0) {
first = first.substring(1, closingBracket);
}
} else {
const colonCount = first.split(':').length - 1;
if (colonCount === 1 && first.indexOf('.') > -1) {
first = first.split(':')[0].trim();
}
}
first = first.trim();
return first || undefined;
- Save the template.
5. Create four user-defined variables
Create these variables in the order listed. Variables 3 and 4 depend on the template from the previous step.
Step 8. v - Incoming Client ID
- Go to Variables and click New under User-Defined Variables.
- Configure as follows:
Field | Value |
|---|---|
Variable Type | Event Data |
Key path | |

Step 9. h - User-Agent
- Click New and configure as follows:
Field | Value |
|---|---|
Variable Type | Request Header |
Name | |

Step 10. clean - ip_override from xff
- Click New and configure as follows:
Field | Value |
|---|---|
Variable Type | Clean X-Forwarded-For |
headerValue | |

Step 11. h - X-Forwarded-For
- Click New and configure as follows:
Field | Value |
|---|---|
Variable Type | Request Header |
Name | |

6. Update your GA4 tag
Step 12. Add parameters and apply the transformation
- In your sGTM container, open your existing GA4 tag.
- Under Parameters, add the following:
Parameter Name | Value |
|---|---|
| |
| |
- Under Transformations, apply fpid_transformation.

7. Configure the Conversion Linker tag
Step 13. Edit or create the Conversion Linker tag
- Open or create the Conversion Linker tag in your sGTM container.
- Set the trigger to fire on all events (or all pages, depending on your setup).
- Save and publish your container.

🎉 Nimbata will now send call events directly to your sGTM container. Each event is enriched with first-party ID and device data, then forwarded to GA4, bypassing ad-blockers and browser restrictions entirely. Make a test call to confirm the event appears in your GA4 real-time view.
Detailed Guide: Tracking numbers 101: how to set up call tracking numbers with Nimbata
Detailed Guide: How to connect Nimbata to Google Analytics 4
Updated on: 24/04/2026
Thank you!