'GA4 event Validation only returns 204

GA4 documentation provides an example of how to send requests to the GA4 Measurement Protocol endpoint for validation.

Using the example providing the ids being asked for the response is always a 204 without a body when the documentation reads that there should be a response body with an array called validationMessages.

Does anyone know why the debug endpoint would only ever return a 204?



Solution 1:[1]

It seems a 204 status code is to be expected from GA4.

From inspecting the response given in the Event Builder (https://ga-dev-tools.web.app/ga4/event-builder/) through the Network log in my browser, there is indeed a JSON response including the key validationMessages.

Being in the same situation as you, I investigated and found the target URL in the Event Builder is actually https://www.google-analytics.com/debug/mp/collect. By sending your data to this URL, you will also receive a JSON response with additional information about your request and any potential errors.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1