Technical
Measurement protocol
Also called MP, collect API.
Measurement protocol is an HTTP API that accepts events as JSON or form data, so a server, app, or device can report hits without the official browser snippet. You send the request and the collector stores the event.
How it is measured
A call is a POST to the collector URL with a site or measurement id, a secret or key, a client id, and a list of events with names and parameters. A 2xx response means accepted for processing. Many collectors return 204 even for events they later discard, so a validation endpoint is the only way to learn why one dropped.
Verify in the real-time or debug view. Send one event with curl and watch it appear within seconds. If it does not, check the client id format, the timestamp (too old is rejected), and the key.
Worked example
A till system at a bakery chain posts `purchase` events with `value` and `currency` after each sale. 1,420 events leave the tills on Saturday and 1,396 show up. The 24 missing ones carried a client id that was an empty string.
Generating a stable UUID per till session brings the receive rate to 1,420 of 1,420. A browser tag could never have seen these in-store sales.
How it differs
The measurement protocol is the interface. Server-side tracking is the practice of sending from your own server, and it uses the protocol or a first-party endpoint to do so. The protocol can also be called from a phone app or a till, which no server-side container is involved in.
Common errors
Sending events with no client id. Reusing one id for every user. Posting stale timestamps. Exposing the secret in front-end code. Sending the same purchase from both browser and server without an event id. Treating a 2xx as proof the event was counted.
In practice
Use one stable id per user or device, call the debug endpoint while developing, and add an event id so you can deduplicate against browser events. Keep the secret on the server.