Recently, I ran into a puzzling issue: events sent to GoogleAnalytics4 through the Measurement Protocol simply weren’t being recorded. Everything checked out — data was valid, events appeared in Debug View — but they were nowhere to be found in the reports.
After some digging, I discovered the problem occurred whenever the user_id parameter was included in the event payload. If I removed it, everything worked perfectly. But the user_id is a valuable parameter — it helps stitch sessions together and improves attribution accuracy.
The solution emerged when I compared the settings of different GA4 properties. The issue turned out to be tied to the Data Collection section. If you’ve acknowledged the “User Provided Data Collection” policy, Google requires you to send a user_data object alongside the user_id in the payload—even if the object is empty. Without it, the events get blocked.
Here’s how you can fix it:
1. Stop sending the user_id parameter (though this means losing valuable insights).
2. Add an empty user_data object to the payload. This option preserves all your data and works seamlessly.
Personally, I opted for the second solution — it keeps the data intact and resolves the issue. If you’ve faced a similar problem, give it a try. You can find an example JSON payload with this fix in the image.
If you work with GA4 to BigQuery exports, be sure to check out my SQL cheat sheet.