This question already has answers here:
Firebase - log events from server side cloud functions [duplicate]
(1 answer)
Firebase analytics from remote REST API?
(3 answers)
Closed 2 years ago.
Firebase Client (JS) supports Firebase Analytics.
In there, I use the method logEvent to log my events to GA v2 and see great funnels.
However, some events, like database events, or HTTP requests coming from a 3rd party aren't tracked by the client, obviously, so we are looking at how to log events from the firebase admin SDK, or just via a Google Analytics API.
It, unfortunately, seems like the "google analytics measurement protocol" used in firebase analytics doesn't have an API. Official or not.
I am looking for a canonical response to know if it is or is not possible to log events (or page views) from the firebase admin SDK or generally using whatever API / library in Node.JS
An immediate solution was to try to use the firebase client SDK in Node, however from this page: https://firebase.google.com/docs/web/setup It seems like if I instantiate the firebase client SDK on a Node.js server, I cannot use the analytics feature.
Edit:
While there are other similar questions, they are over a year old, and the responses might not be valid anymore.
Firebase analytics log events with cloud functions
Can I track my Firebase function in Google Analytics?
Firebase - log events from server side cloud functions
Firebase analytics from remote REST API?
Related
I have Firebase analytics data and enabled BigQuery. But I have a requirement to validate the number of events and screens at app side under automated UI testing. Anyway to access and validate the Firebase analytics data at ios app side programmatically either in swift or objective c?
There is no API to retrieve Google Analytics data through Firebase. See Can I get firebase analytics data using query?
There is also no API for BigQuery to allow secure access directly from your client-side app. That would be a significant security risk, as you'd be exposing data about all of your users to all of your users.
The usual way to implement functionality is to create a custom endpoint (either using a server you already have, or Cloud Functions for Firebase) that exposes just the information your clients need access
I am trying to list all google analytics properties connected to a google account.
While this works fine using the google analytics management api, it seems the connected firebase projects are missing:
While in the analytics web UI the firebase property is listed. I took a look at how Google itself queries for this data and they use some kind of internal API:
https://analyticssuitefrontend-pa.clients6.google.com/v1/search/entityHeaders
Result:
I tried adding a firebase related scope (https://www.googleapis.com/auth/firebase.readonly) to my OAuth authorization but the property was still missing.
How can I query for the full list?
As DaImTo mentioned in a comment these systems are separate and firebase analytics data can not be queried via the google analytics API. This also holds true for listing connected firebase projects.
The confusion might arise, because google provides access to firebase analytics data under the hood of the google analytics website.
This question already has answers here:
Firebase analytics from remote REST API?
(3 answers)
Closed 4 years ago.
We've developed a mobile app using Firebase and we want to add analytics. We want to add to the analytics several system events that are triggered from existing cloud functions. I do not see any way to log an event from a cloud function and the only way I see is from the client side.
Is there a way we can log event from the server side ?
There is no server side logging for Analytics events. Analytics requires information available only on the client in order to construct an event, and backend code doesn't have access to that information. If you need to log something on the server for use with analytics, you would have to log to another destination, and then export it all (including events originating from Firebase) to BigQuery to match up later for querying.
Context: We have natively integrated Firebase Analytics Events in our app, I need to now forward these events to 3rd Party marketing & attribution platforms.
As of today, I can either implement:
Google Tag Manager (GTM), or
Pass events by using Firebase Cloud Functions (Server-side).
Question: The documentation states one can extend Google Analytics for Firebase with Cloud Functions, but with an added clause:
Only events marked as conversion events are currently supported by
Cloud Functions. You can specify which events are conversion events in
the Events tab of the Firebase console Analytics pane.
I however stumbled unto this tutorial, where the company forwards all their Events with Firebase Cloud Functions (without limitations). I would like some clarification on whether this latter approach is really a best practice, or am I really only constrained to forward 10 Conversion Events through Cloud Functions (as stated in the documentation) ? Thanks in advance :)
Google Analytics for Firebase only sends conversion events to Cloud Functions for Firebase.
we are planning to move from the GA SDK to the Firebase SDK. Within the GA SDK there were options to retrieve the google analytics client ID (https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid). This was fundamental since we transferred this value to the WebView (within the app), so that the customers tracking across native/webview was possible.
Does anybody know how to retrieve this client ID within firebase analytics SDK (iOS & Android)?
Thanks!
The short answer is no - the client ID equivalent (app instance ID) is not currently accessible through an SDK API.
The longer answer :
Firebase Analytics currently only supports logging events from native code. And so, the js code in your webview would call native code to log events and you don't need access to the app instance ID.