You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Firebase Analytics SDK currently requires developers to choose a single destination for all analytics events. The entire data stream is sent either to the Google Analytics default endpoint or is redirected to a custom server-side Google Tag Manager (sGTM) endpoint.
This "all-or-nothing" approach presents a challenge for developers who want to optimize both cost and functionality. A common and ideal workflow is to split traffic at the source:
Send high-value events (e.g., purchase) to the sGTM endpoint for robust server-side processing and integration with other APIs.
Send high-volume standard events (e.g., screen_view, user_engagement) directly to the Google Analytics default endpoint to avoid unnecessary sGTM server costs.
This feature would allow developers to implement this hybrid strategy directly in the app using the Firebase Analytics SDK, providing granular control over data flow.
It would also not be necessary to implement manual event sending to the sGTM endpoint.
API Proposal
Perhaps add an optional parameter to the logEvent method that explicitly specifies one of two destinations: the default GA4 servers or the configured sGTM server.