Search code examples
firebasegoogle-analyticsgoogle-cloud-functionsfirebase-analyticsgoogle-analytics-firebase

Can I log a custom event to Firebase Analytics from a Cloud Function?


I have a Google Assistant action with Firebase fulfilment via Cloud Function. I would like to also log custom events to the projects Analytics instance. Is it possible to do this? Do I need to use the Firebase Admin framework so it has automatic access to the Analytics instance?


Solution

  • It's not possible to log analytics events from backend code. They can only be logged directly from the web or mobile app itself using the provided client SDK.