I tried to send event to Google Analytics 4 using the postman.

And GA4 just response 204 No Content and the event is not recorded in the data stream. I checked the measurement_id and api_secret has right value. Is there anything wrong?
Thank you.
I encountered this issue today.
For me personally, it turns out I was looking for my received data in the wrong place: I was looking in Admin > Data Streams, which incorrectly told me "No data received in past 48 hours."
Where I actually needed to look was in the "Realtime Overview" (Reports > Realtime - see picture):

In there, there was a handy little event counter that showed me my events were, in fact, getting through just fine.

If you check here and it's still zero, here are some other things to try:
You may need to set the Content-Type header to "application/json".
Validate your events by sending them to the endpoint https://www.google-analytics.com/**debug**/mp/collect rather than https://www.google-analytics.com/mp/collect - as long as you get "validationMessages": [] back, you should be good to go.
Make sure the JSON you're sending matches this format
According to the folks over at this similar StackOverflow question, You may need to set the User-Agent header, though I personally did not have to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With