GA4 Measurement Protocol /mp/collect
GA4's documented server-to-server API for sending events, such as offline purchases, into a GA4 property.
The request at a glance
- Request
POSThttps://www.google-analytics.com/mp/collecthttps://region1.google-analytics.com/mp/collect- Sent by
- Google Analytics 4
- Typically triggered by
- Server-side code posting events
- Related cookies
- _ga
What this request is
The Measurement Protocol is GA4's documented API for sending events from servers and apps rather than from the visitor's browser. It adds events to the same GA4 property as the website's tag.
Requests are authenticated with an API secret created in the GA4 interface. To tie server events to a website visitor, they reuse the client ID from the visitor's _ga cookie.
What typically triggers it
- A back-end system recording an event the browser cannot see, such as an offline purchase, a refund or a subscription renewal.
- Server-side integrations that send events on behalf of a website or app.
Important parameters
| Parameter | What it means | Source |
|---|---|---|
api_secret | Query parameter: the secret created in the GA4 interface for this data stream. | Vendor-documented |
measurement_id | Query parameter: the web stream's measurement ID (G-XXXXXXX). | Vendor-documented |
client_id | Body field: identifies the browser, normally taken from the _ga cookie. | Vendor-documented |
user_id | Optional body field: your own ID for a signed-in user. | Vendor-documented |
events | Body field: up to 25 events, each with a name and params such as session_id and engagement_time_msec. | Vendor-documented |
timestamp_micros | Optional body field: when the event happened. | Vendor-documented |
How to find it on a site
- Open the site in Chrome, open DevTools (F12, or Cmd+Option+I on a Mac) and go to the Network tab.
- Reload the page and type
mp/collectinto the filter box. - Click a matching request and open Payload to read its parameters. Some may be in the request body rather than the URL.
- You usually won't see this request in the browser, because it is sent from servers. Google provides a validation endpoint at /debug/mp/collect for testing payloads.
Sources
The endpoint, the sender and the parameters marked vendor-documented were checked against the sources above on . Browse all network requests.
Know when a tag stops firing
TagPipes Auditor checks with real browsers that your marketing pixels fire with the right parameters, and alerts you when tracking breaks. Pulse checks how marketing tags behave against your consent banner.
TagPipes monitors, configures and reports. It does not determine legal compliance and does not provide legal advice. Output is informational and reflects observed state at the time of observation. Rawsoft's expertise is technology, not law; please confirm any regulatory interpretation with your own counsel.