1

I am trying to use the Google Analytics Measurement Protocol to record some events happening on my server-side code. I am using the REST API as suggested here but I don't see any events on the Google Analytics dashboard.

When I try to add the event via the Google Analytics Hit Builder, then I am able to see that event in the dashboard.

I don't think any authentication is required while using the REST API and only a correct tracking ID is required which is present. I have confirmed that the POST request is not failing.

I am looking at the Realtime > Events to check whether the events are pushed or not. Is there a place where I can check the historical data to see if the events are present there.

Thanks!

Varun Gupta
  • 2,870
  • 6
  • 33
  • 73
  • 1
    I would try using the debug endpoint `https://www.google-analytics.com/debug/collect` as the API still returns 200 if it receives the request successfully but parsing fails [see here](https://developers.google.com/analytics/devguides/collection/protocol/v1/validating-hits#request) – Baffour May 24 '19 at 14:38
  • Thanks @Baffour, your suggestion helped. Although I was following the instructions as is from the guide but somehow the content-type was not set to `application/x-www-form-urlencoded` due to which the parameters were not received in the required format. – Varun Gupta May 25 '19 at 04:03

0 Answers0