Select spec version:

Firebase Destination Config Reference

Beta
Complete Rudder CLI reference for the Firebase destination config keys, event filtering, and mobile device mode source types.
Available Plans
  • free
  • growth
  • enterprise

Firebase is a mobile analytics destination that runs only in device mode. RudderStack’s mobile SDKs load the Firebase SDK in the app and log identify, track, and screen calls to Google Analytics for Firebase from there, mapping track events to Firebase’s standard events where they match.

In a Firebase destination spec:

  • type: firebase
  • definition_version: 1

Sample configuration

yaml
version: rudder/v1
kind: destination
metadata:
  name: firebase-prod
spec:
  id: firebase-prod
  display_name: Firebase Production
  type: firebase
  definition_version: 1
  enabled: true
  config:
    event_filtering:
      blacklist:
        - Application Backgrounded
        - Debug Event

    connection_mode:
      android_kotlin: device
      ios_swift: device
    consent_management:
      android_kotlin:
        - provider: oneTrust
          consents:
            - analytics

The above example connects Kotlin and Swift apps. The Firebase project itself isn’t configured here — the app bundles it, in the google-services.json or GoogleService-Info.plist file Firebase generates — so event_filtering is the only Firebase-specific key. See Event filtering.

Config keys

config accepts only the keys listed below. The shared config key rules cover unknown keys, defaults, and immutability.

Firebase runs only in device mode. The mobile SDKs send it identify, track, and screen calls from the app, so every key below configures what the SDK does in the app.

Event filtering

Every source connects to Firebase in device mode, where the SDK applies the filter, so client-side event filtering applies to track events from every source.

event_filtering

Type: object

Description: Restricts which track events the SDK passes to Firebase, by event name.

Notes:

  • whitelist — array of event names to allow; every other track event is dropped.
  • blacklist — array of event names to drop; every other track event is allowed.
  • The two are mutually exclusive, and Rudder CLI enforces it — setting both fails validation.
  • Each name is at most 100 characters, or a {{ path || fallback }} template.
  • Omit the block entirely to filter nothing.
yaml
event_filtering:
  whitelist:
    - Order Completed
    - Product Added

Per-source keys

Both keys are objects keyed by the local source type — the tokens listed under Source types. A key naming a source type this destination doesn’t support fails validation.

connection_mode

Type: object

Description: Maps each source type you connect to the mode its events reach Firebase in. Firebase accepts only device.

Notes:

  • An entry is required for each source type you connect — see Connect a source.
  • Any other mode fails validation — for example cloud for android.
yaml
connection_mode:
  android: device
  ios: device
  react_native: device

Source types

Firebase accepts events from these source types in the mentioned connection modes:

Source typeConnection mode
androiddevice
android_kotlindevice
iosdevice
ios_swiftdevice
unitydevice
react_nativedevice
flutterdevice

Firebase accepts only mobile SDK sources, and only in device mode — the SDK loads Firebase in the app, and no events pass through RudderStack’s servers. It doesn’t accept web, cordova, or cloud sources. See Add device mode integration.

Connect a source

An event stream connection to this destination is checked against two rules at validate time.

The source’s type must be supported. Firebase accepts the types the mobile SDK sources resolve to. A JavaScript source resolves to web, a Cordova source to cordova, and webhook and server-side SDK sources to cloud — none of which Firebase accepts — and reports, for example:

destination 'firebase-prod' (type 'firebase') does not support source 'my-web-app':
source type 'web' is not among supported source types: android, android_kotlin, ios, ios_swift, unity, react_native, flutter

The destination config must carry a connection_mode entry for that source type. This lives on the destination spec, not on the connection spec. Without it:

destination 'firebase-prod' config has no 'connection_mode' entry for source type 'android'

Firebase needs no additional config keys to connect a source of any supported type.

Secrets

Firebase has no secret keys, and no credentials in its config at all. The app authenticates to Firebase with the configuration file it bundles.

Changes by release

No changes since this type became available.

For changes across every destination type, see Destination Type Changes by Release.

See more

Questions? Let's figure it out together.

Join the RudderStack Slack community to connect with other users, customers, and the RudderStack team — or reach out for direct support.