Firebase analytics from remote REST API?

There's no available REST API where you can upload, download or even analyze analytics data. You could reach out to the Firebase Support team and file a feature request for this. I believe that it's not only you who's looking for this kind of functionality in Google Analytics for Firebase.

You could directly download your event's analytics data as CSV using the Firebase console. Or, if you're on a blaze plan, link your Firebase to BigQuery, and the analytics data will be exported to a corresponding data set in a daily basis.


This is now in the early stages of being possible with Measurement Protocol (Google Analytics 4) but it's literally in the process of being rolled out as we speak. I have implemented server-to-server events to my iOS firebase data stream. Example curl-like request.

Faraday.new(url: "https://www.google-analytics.com/mp/collect?firebase_app_id=#{your_app_id}&api_secret=#{secret_from_ga4_stream_details}").post do
  req.headers["Content-Type"] = "application/json"
  req.body = {app_instance_id: firebase_instance_id, user_id: user.id, events: [{}]}.to_json
end

This is a slightly different signature from a standard G4 property where the query params include measurement_id and client id. For firebase project you pass firebase_app_id which you get from your firebase project settings. firebase_instance_id is something you're probably not familiar with and something you will have integrate from device to the backend. For example, the instance id from ios would be Analytics.appInstanceID()