Table of Contents
ToggleShort answer: GA4 app events with measurement_id go to the wrong place. Google’s Measurement Protocol documentation lists two client types. For a Firebase app, the URL carries firebase_app_id and api_secret, and the body carries app_instance_id and events. For the web, the URL carries measurement_id, and the body carries client_id. Sending an app_instance_id with measurement_id aims app events at a web stream, so they do not show under the app. Replace measurement_id with firebase_app_id in the URL and resend.
This guide is for developers, marketers and agencies who send app events to GA4 from a server. Below you will find the two client types, a BAD and a GOOD cURL command, four common causes of GA4 app events with measurement_id with a way to check each one, a quick fix, a way to validate before going live, a checklist and a short FAQ.
The button opens the Attribution Debugger with a sample request that uses measurement_id for an app event. You can paste your full cURL command. The tool reads the URL and the body together, and drops the api_secret before checking. The check runs in your browser and nothing is uploaded. It reads only the request you paste and explains likely causes. It cannot see inside your GA4 property and it cannot send events.
The Measurement Protocol accepts events from your server, and it has two client types. The Firebase client type is for apps. Its URL query parameters are firebase_app_id and api_secret, and its JSON body carries app_instance_id and events. The gtag client type is for the web. Its URL carries measurement_id and api_secret, and its body carries client_id and events.
Both IDs go in the URL query string, not in the JSON body. Google describes app_instance_id as the identifier for a specific installation of a Firebase app. It is not the same as a web client_id, and it must be retrieved using the Firebase SDK.
GA4 app events with measurement_id mix the two types. The body says app, and the URL names a web stream.
Google’s troubleshooting page says measurement_id is used with gtag.js and identifies a data stream, and firebase_app_id is used with the Firebase SDK and identifies your Firebase app. The practical result is that a request with measurement_id is aimed at a web stream. So the app events do not appear under the app.
The request will not tell you. Google’s documentation says the production endpoint does not return an HTTP error code, even if an event is malformed or required parameters are missing. A success response proves little, so validate the request before going live. The next sections show how.
Here is a request that sends an app event with measurement_id in the URL and an app_instance_id in the body. The URL names a web stream, so the app event is aimed at the wrong place:
curl --request POST \
--url 'https://www.google-analytics.com/mp/collect?measurement_id=G-XXXXXXXXXX&api_secret=YOUR_API_SECRET' \
--header 'content-type: application/json' \
--data '{
"app_instance_id": "0123456789abcdef0123456789abcdef",
"events": [
{ "name": "login", "params": { "method": "email" } }
]
}'And the fixed request, with firebase_app_id in the URL and the same body:
curl --request POST \
--url 'https://www.google-analytics.com/mp/collect?firebase_app_id=YOUR_FIREBASE_APP_ID&api_secret=YOUR_API_SECRET' \
--header 'content-type: application/json' \
--data '{
"app_instance_id": "0123456789abcdef0123456789abcdef",
"events": [
{ "name": "login", "params": { "method": "email" } }
]
}'All the values above are placeholders. Never paste a real api_secret, Firebase app ID or app instance ID into a post, a chat or a screenshot. Google’s page notes that its example is for server-side use, because client-side code would expose the api_secret.

The rule that app events need firebase_app_id comes from Google’s Measurement Protocol documentation. The four causes below are common causes seen in real setups, not Google statements. Each one ends with a check you can run.
Support: common cause, not a Google statement. A working web script is copied for the app, and only the body is changed to app_instance_id. The URL still carries measurement_id.
Fix: make the URL for app events a separate function that uses firebase_app_id.
How to check: read the final URL your server sends. If it has measurement_id=G- next to an app_instance_id in the body, this is the cause.
Support: common cause, not a Google statement. The GA4 admin shows several IDs, and the measurement ID starting with G- is easy to copy by mistake when you wanted the Firebase app ID.
Fix: copy the Firebase app ID for the app, and keep the measurement ID for the web stream only.
How to check: compare the ID in your request with the one for the app, and confirm it does not start with G-.
Support: common cause, not a Google statement. One variable such as GA_ID feeds both the web and the app code, so app events pick up the web ID.
Fix: use two variables with clear names, one for measurement_id and one for firebase_app_id.
How to check: search your code and your deploy settings for every place the ID is read.
Support: common cause, not a Google statement. Some server libraries and wrappers are written for the web client type, and build the URL with measurement_id unless you configure them otherwise.
Fix: check the library settings for an app option, or build the URL yourself.
How to check: log the URL the library actually calls, with the api_secret removed.
For app events, use this URL, with app_instance_id from the Firebase SDK in the body:
https://www.google-analytics.com/mp/collect?firebase_app_id=YOUR_FIREBASE_APP_ID&api_secret=YOUR_API_SECRETmeasurement_id with firebase_app_id in the URL.firebase_app_id and api_secret in the URL query string, not in the JSON body.app_instance_id from the Firebase SDK, not from a web client_id.Because the production endpoint returns no HTTP error code for a broken event, Google provides a validation endpoint. Send the same request to /debug/mp/collect instead of /mp/collect. The response has a validationMessages array, and each message has a fieldPath, a description and a validationCode.
curl --request POST \
--url 'https://www.google-analytics.com/debug/mp/collect?firebase_app_id=YOUR_FIREBASE_APP_ID&api_secret=YOUR_API_SECRET' \
--header 'content-type: application/json' \
--data '{
"app_instance_id": "0123456789abcdef0123456789abcdef",
"events": [
{ "name": "login", "params": { "method": "email" } }
]
}'firebase_app_id and api_secret, and no measurement_id.app_instance_id comes from the Firebase SDK.Paste the full cURL command for your GA4 app events with measurement_id into the Attribution Debugger, and it explains the likely causes. It reads the URL and the body together, and drops the api_secret before checking. It reads only what you paste, so it cannot see inside your GA4 property and it cannot send events. The check runs in your browser and nothing is uploaded.
If the findings are more than you want to fix yourself, use the buttons under the report to request a written fix plan. For more guides like this one, go back to the debug hub, or read the AppsFlyer S2S 401 guide and the action_source missing guide. Source: Google, Measurement Protocol (GA4) reference.
They belong to two different client types. Google’s Measurement Protocol documentation uses firebase_app_id with the Firebase SDK, where it identifies your Firebase app, and measurement_id with gtag.js, where it identifies a data stream. Both go in the URL query string, together with api_secret.
One common reason is that the request uses measurement_id with an app_instance_id. measurement_id belongs to the web client type, so the events are aimed at a web stream and do not show under the app. Google’s documentation also says the production endpoint returns no HTTP error code for a malformed event, so validate the request first.
In the URL. For the Firebase client type, firebase_app_id and api_secret are required query parameters. The JSON body carries app_instance_id and events.
No. client_id is the identifier for the web client type, used with gtag.js. app_instance_id identifies a specific installation of a Firebase app, and Google says it must be retrieved using the Firebase SDK. A web client_id will not work in its place.
Google’s documentation says the Measurement Protocol does not return HTTP error codes, even if an event is malformed or required parameters are missing. A success response therefore says nothing about whether the event is correct. Send the same request to the validation endpoint, which returns validation messages.
Yes. Send the request to the validation endpoint, https://www.google-analytics.com/debug/mp/collect, which checks the structure and returns validation messages. You can also paste the full cURL command into the Attribution Debugger, which checks it in your browser and uploads nothing.
Built by Al-Fahad Hridoy, an Attribution & Tracking Consultant who fixes Meta Conversions API, WhatsApp click-to-chat, AppsFlyer and Firebase tracking for apps and websites.