> For the complete documentation index, see [llms.txt](https://server-side.docs.sirdata.net/sirdata-server-side/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://server-side.docs.sirdata.net/sirdata-server-side/english-1/f.a.q-server-side/tracking/how-does-server-side-tracking-work.md).

# How does server-side tracking work?

### 🧠 Understanding Server-Side Tracking with Google Tag Manager

#### Introduction

With growing privacy-related restrictions, ad blockers, and the gradual disappearance of third-party cookies, **server-side tracking** is establishing itself as a reliable and future-proof solution. But how does it work in practice, and how does it differ from classic client-side tracking via GTM Web?

In this article, we review the fundamental differences between the two approaches, and answer the key question: **will I lose data if my server-side container is not yet configured?**

### ❓ What information is collected at the level of the GTM Server instance hosting service?

Three types of processing are carried out as part of this service:

**Logging data (logs)**

* Collection of the IP address (truncated).
* Retained for a maximum of 3 days before deletion.

**Billing data**

* Collection of the information required for billing.
* Data anonymized to prevent any direct identification.

**Enrichment of the data entering the GTM Server instance**

* Addition of the full IP address and inferred location information (e.g. country, region).
* This data is used solely to enable server-side tag conditioning (for example, firing a tag or not depending on the user's location).

### 🆚 Web (client-side) vs Server-side Tracking

#### 1. The classic model: client-side tracking

In a classic setup, everything happens in the user's browser:

* Tags are fired in GTM Web.
* Events (page views, conversions, clicks...) are sent **directly from the browser** to the platforms (Google Analytics, Meta, TikTok...).

```plaintext
user
     │
     ├──→ GA4  → google-analytics.com
     ├──→ Meta → facebook.com/tr
     └──→ Other platforms...
```

✅ **Advantages:** Easy to set up, immediate.\
❌ **Drawbacks:** Adblockers, ITP, data loss, little control.

#### 2. The advanced model: server-side tracking

With server-side tracking, the web-side tags **no longer send data directly to the platforms**, but to a **GTM container installed on a server** (usually via a subdomain such as `https://tracking.yourdomain.com`).

The flow becomes:

```plaintext
user
     │
     └──→ GTM Web → tracking.yourdomain.com (GTM Server)
                            │
                            ├──→ Google Analytics
                            ├──→ Meta / TikTok
                            └──→ Other platforms
```

✅ **Advantages:**

* Less blocked data (no third-party domain)
* Better control over the data sent
* Ability to enrich, filter or reformat the data before sending

### ❓ What if the server-side container is not ready yet?

This is a frequent question:

> "What happens if the server-side container is installed, but I have not yet configured the server-side events? Do I lose data?"

#### The answer is **no** — as long as you do not prematurely redirect your web tags to the server.

👉 As long as you do not modify your GTM Web tags to send data to the server (via a custom endpoint such as `https://tracking.yourdomain.com`), **events will continue to be sent directly to the platforms**.

This means you can perfectly well:

* Deploy the server-side infrastructure **in advance**
* Test and configure your server-side clients and tags **gradually**
* **Switch the web tags over to the server only when everything is ready**

There is therefore **no tracking interruption**, as long as the transition is properly managed.

### 📌 Conclusion

Server-side tracking with GTM enables more robust, privacy-friendly and better-controlled data collection.\
But it does not immediately replace web tracking: it comes **as a complement**, and its implementation can be **gradual**, with no risk of data loss as long as the client-side tags are not redirected.
