google-analyticsuniversal-analyticsmeasurement-protocolnodejs-server

Cannot find measurement protocol in GA4 data stream to create api-secret for sending events


Initially, I had set up Universal Analytics to track some user activity on my web application but I then realized that I cannot generate reports(get data back from the dashboard for further analysis) and then decided to switch to google analytics 4 as they have a provision for receiving data as mentioned in https://www.npmjs.com/package/@google-analytics/data

NOTE: I am sending data from a nodejs server

I am trying to send some user data to Google analytics 4 and have encountered the below issue, In the documentation, it says "To create a new secret, navigate in the Google Analytics UI to: Admin > Data Streams > choose your stream > Measurement Protocol > Create", however, I cannot see the measurement protocol option in the data stream, and I did not find this option anywhere in the settings or elsewhere.

How do I create it for a POST request as explained in https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=gtag#send_an_event

If there is any way to receive data from Universal analytics ,it would be great but any help regarding the api_secret will also help.

Thank You.


Solution

  • This happens because your user has only Read & Analyze permissions while to view Measurement Protocol API secrets option you also need Edit permissions.