Introduction
When we talk about server-side tracking, most people think of server-side tag managers like GTM SS or Adobe Edge. But you don’t necessarily need a TMS — it’s totally possible to send direct server-to-vendor HTTP calls using basic POST or GET requests.
Let’s compare how it works across 3 key platforms: Google Analytics 4, Adobe Analytics, and Matomo.
🟢 Google Analytics 4 – Measurement Protocol (GA4)
GA4 provides a dedicated server-side endpoint to send events directly.
- Endpoint:
POST https://www.google-analytics.com/mp/collect?measurement_id=G-XXXX&api_secret=YOUR_SECRET - Parameters:
measurement_id— data stream ID (query string, required)api_secret— secret created in Admin > Data Streams > Measurement Protocol (query string, required)client_id— unique client ID (from the_gacookie)user_id— optional user ID for signed-in usersevents— array of events with name + paramstimestamp_micros— optional, Unix time in microseconds; events can be backdated up to 72 hours - Key point:
Readclient_id(from the_gacookie) andsession_id(gtag('get', …)) in the browser and send both with the server event:client_idties the event to the user,session_idties it to the session (Measurement Protocol reference, GA4 cookies). - Use cases:
Backend transactions, confirmation emails, or pure back-office actions (e.g. ERP updates). Google positions the Measurement Protocol as a complement to gtag/GTM/Firebase, not a replacement: a property fed only by MP gets partial reporting (Measurement Protocol overview).
🔵 Adobe Analytics – Direct HTTP Tracking
Adobe accepts direct hits through the Data Insertion API (one hit per request, query string or XML POST). For new server-side projects Adobe recommends the Bulk Data Insertion API (batched files). See Data Insertion API.
- Endpoint:
GETorPOSTto:https://<your-tracking-server>/b/ss/<reportSuiteID>/0/
(tracking server = your edge domain, e.g.xxx.data.adobedc.netor your CNAME) - Main parameters:
vid— visitor ID (manually generated or passed from ECID)mid— optional Experience Cloud ID (ECID)pageName— page name or hit labelevents— event string, e.g.purchaseproducts— product string in Adobe format - Key point:
Adobe’s visitor reconciliation depends on a properly managedvidor ECID. Ideally, the ECID is set client-side and passed to the backend. - Use cases:
Hybrid setups with web + native apps, loyalty actions, post-login behaviors tracked server-side.
🟠 Matomo – Tracking API (Simple & Flexible)
Matomo provides a very flexible HTTP API with both GET and POST options.
- Endpoint:
https://matomo.example.com/matomo.php - Parameters:
idsite— Matomo site ID (required)rec— must be 1 (required)_id/cid— visitor ID, exactly 16 hexadecimal characters (not a UUID); for logged-in users preferuiduid— optional user IDe_c— event category (required for an event)e_a— event action (required for an event)e_n— event namee_v— event value (optional)url— page URL associated with the event
Source: Matomo Tracking HTTP API - Key point:
Like GA4, read the visitor ID (_id, 16 hexadecimal characters) in the browser and send it with your server hit. - Use cases:
Self-hosted analytics where you keep the data on your own infrastructure (consent rules still apply, see the CNIL).
🎯 Best Practices for Native Server-Side Tracking
✅ Always pass a persistent identifier:
client_idfor GA4vidormidfor Adobe_idoruidfor Matomo
✅ Sync that ID from your frontend:
- Read it from a cookie, localStorage, or via header injection
✅ Add timestamps if possible:
- To preserve event ordering, especially when logging backend actions asynchronously
✅ Log and document:
- Keep a copy of what you’re sending (for debug + compliance)
✅ When to use native server-side tracking?
‣ You’re working on backend-driven logic (e.g. payment confirmation, account creation)
‣ You need full control over what’s sent
‣ You want to avoid client JS execution (performance, security), while still forwarding the user’s consent state with each event
‣ You’re building fraud detection, reconciliation, or scoring mechanisms
‣ You’re looking for a lightweight alternative to full server-side TMS infrastructures
Related reading
- Matomo Server-Side Tracking: How to Set It Up (5 Options Compared)
- Custom Domain ≠ Server-Side Tagging: What Really Changes for GA4 and Adobe
- Server-Side Tracking Demystified: How It Really Works (And Why Ad Blockers Still Matter)
- Server-Side Tracking Architecture: Reverse Proxy, DNS Cloaking, and First-Party Resilience Explained