# Measurement Protocol

> The GA4 Measurement Protocol sends events to Google Analytics over HTTP from servers and offline systems. Request anatomy, limits and a validation check.

Canonical: https://scaplet.com/glossary/measurement-protocol

Glossary Glossary · Measurement

The GA4 Measurement Protocol sends events to Google Analytics over HTTP from servers and offline systems. Request anatomy, limits and a validation check.

2 min

read

4

sources

Nov 1, 2026

updated

Scaplet Editorial Team

author

In one line

The Measurement Protocol is a set of HTTP endpoints for sending events straight to Google Analytics servers, mainly from servers and offline systems. Google says it is meant to augment gtag, Tag Manager or Firebase collection, not replace it.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fmeasurement-protocol%20(%22Measurement%20Protocol%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fmeasurement-protocol%20(%22Measurement%20Protocol%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fmeasurement-protocol%20(%22Measurement%20Protocol%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fmeasurement-protocol%20(%22Measurement%20Protocol%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

## At a glance

5 facts from the sources below

HTTP POST only

Method

www.google-analytics.com/mp/collect

Endpoint

25 maximum

Events per request

Under 130 kB

Post body

Collect endpoint returns no HTTP error codes

Errors

_01_At a glance

## Anatomy of a request

A web-stream request carries the stream's measurement ID and an API secret in the URL and a client ID plus events in the JSON body. Values below are placeholders.

Part

### `measurement_id`

Job

Identifies the [web data stream](/glossary/data-streams) the event goes to

Part

### `api_secret`

Job

Created under Admin, Data Streams, your stream, Measurement Protocol, Create

Part

### `client_id`

Job

Joins the event to an online interaction and carries its privacy settings

Part

### `events`

Job

Array of event objects, each with a `name` and optional `params`

Part

### `session_id` (optional)

Job

Ties the event to a session if sent within 24 hours of the session start

Web stream request

```
POST /mp/collect?measurement_id=G-XXXXXXXXXX&api_secret=SECRET HTTP/1.1 Host: www.google-analytics.com Content-Type: application/json { "client_id": "555.1234", "events": [ { "name": "level_up", "params": { "level": 5 } } ] }
```

EU data collection uses the host `region1.google-analytics.com`. The validation check below exercises the web URL shape shown above.

_02_Your call

## When to use it, and when not

If this fits

### Use it for

- Offline conversions and server-to-server events
- Devices without automatic collection, such as kiosks
- Joining online and offline behavior using the same `client_id`

Or

### Do not use it as

- The only collection method: Google says full server-to-server use may give partial reporting
- A replacement for client tagging, since you still need gtag, [Tag Manager](/glossary/google-tag-manager) or Firebase
- A place to rely on event rules: rules that generate or rename events do not apply to these events

**Status**Google's overview says the protocol is mature and will stay operational, and recommends the Data Manager API for new server-to-server integrations. Check that page before starting a new build.

_03_Documented limits from the Send events page

## Limits to design around

Limit

### Events per request

Value

25

Limit

### Parameters per event

Value

25

Limit

### Event and parameter name length

Value

40 characters, alphanumeric and underscores, starting with a letter

Limit

### Parameter value length

Value

100 characters (500 on 360 properties)

Limit

### Request body

Value

Under 130 kB

Limit

### Late events

Value

Events older than 72 hours: accepted with the timestamp set to 72 hours ago under `RELAXED`, rejected under `ENFORCE_RECOMMENDATIONS`

**The collect endpoint will not tell you it failed**Google says the protocol does not return HTTP error codes, even for malformed events. A 2xx only means the request arrived. Validate events before you ship the integration.

_04_Check it

## Check it in 2 minutes

Send a deliberately bad event to the validation endpoint. The response lists problems; an empty `validationMessages` array means none were found. Events sent here do not appear in reports, and the validator does not check your `api_secret`.

To check your real stream, replace the placeholders. Keep the debug path until the response is clean, then switch to `/mp/collect` for production.

Validate an event

```
curl -s -X POST 'https://www.google-analytics.com/debug/mp/collect?measurement_id=G-XXXXXXXXXX&api_secret=test' \ -H 'Content-Type: application/json' \ -d '{"client_id":"555.1234","events":[{"name":"_badEventName","params":{}}]}' # prints a validationMessages array with code NAME_INVALID. # Change the name to level_up and it prints an empty array.
```

Questions

## Asked a lot.

2 questions people ask next, answered from the sources on this page.

_01_ Does the Measurement Protocol replace gtag?

No. Google says it augments automatic collection through gtag, Tag Manager and [Google Analytics](/glossary/google-analytics-4) for Firebase.

_02_ Why did my event not appear and I got no error?

The collect endpoint returns 2xx on receipt and no HTTP error for bad data. Send the same payload to the validation endpoint to see the reason.

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- google.com

1. 01 [Measurement Protocol overview](https://developers.google.com/analytics/devguides/collection/protocol/ga4) developers.google.com · checked 2026-11-01
2. 02 [Send events](https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events) developers.google.com · checked 2026-11-01
3. 03 [Measurement Protocol reference](https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference) developers.google.com · checked 2026-11-01
4. 04 [Validate events](https://developers.google.com/analytics/devguides/collection/protocol/ga4/validating-events) developers.google.com · checked 2026-11-01

## Keep learning

[All glossary](/glossary)

[Learn Data retention Measurement](/glossary/data-retention) [Related Google Analytics 4 Measurement](/glossary/google-analytics-4) [Read next Server-side tagging Measurement](/glossary/server-side-tagging) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[Marketing qualified lead (MQL)](/glossary/marketing-qualified-lead) [max-snippet](/glossary/max-snippet) [Mega menu](/glossary/mega-menu) [Merchant listings](/glossary/merchant-listings)

More in Measurement
[GA4 DebugView](/glossary/ga4-debugview) [GA4 events](/glossary/ga4-events) [GA4 Explorations](/glossary/ga4-explorations) [GA4 sessions](/glossary/ga4-sessions) [Google Analytics 4](/glossary/google-analytics-4) [Google Tag Manager](/glossary/google-tag-manager) [Impressions](/glossary/impressions) [Internal search](/glossary/internal-search) [Key events](/glossary/key-events) [Last touch attribution](/glossary/last-touch-attribution) [Lead scoring](/glossary/lead-scoring) [Magic number (SaaS)](/glossary/magic-number) [Measurement Protocol](/glossary/measurement-protocol) [MRR (monthly recurring revenue)](/glossary/mrr) [Multivariate testing](/glossary/multivariate-testing) [Net Promoter Score (NPS)](/glossary/nps) [Net revenue retention (NRR)](/glossary/net-revenue-retention) [North star metric](/glossary/north-star-metric) [Performance report](/glossary/performance-report) [Pogo sticking](/glossary/pogo-sticking) [Rank tracking](/glossary/rank-tracking) [Referral traffic](/glossary/referral-traffic) [Reporting identity](/glossary/reporting-identity) [Retention rate](/glossary/retention-rate)

Terms on this page
[Data streams](/glossary/data-streams) [Google Tag Manager](/glossary/google-tag-manager) [Google Analytics 4](/glossary/google-analytics-4)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
