Firebase

Firebase is Google's mobile platform that helps you quickly develop high-quality apps and grow your business.

At the heart of Firebase is Google Analytics, a free and unlimited analytics solution. Analytics integrates across Firebase features and provides you with unlimited reporting for up to 500 distinct events that you can define using the Firebase SDK. You can check the code for Firebase destination on GitHub for Android and iOS.

Getting Started

As an initial step, check whether the platform you are working with is supported by Firebase destination

Web

Mobile

Server

📱Device-mode

-

-

☁️ Cloud-mode

-

-

-

  1. From your dashboard add Firebase as a destination.

  2. Depending on your platform of integration follow the steps below to enable Firebase in your project.

Android

iOS

Unity

Identify

The identify call from Rudder will set the userId through setUserId method from FirebaseAnalytics along with other properties from RudderTraits. We ignore age, gender and interest as these are reserved by Google for their own purpose.

[[RudderClient sharedInstance] identify:@"developer_user_id"
traits:@{@"foo": @"bar", @"foo1": @"bar1"}];

Track

The track call from Rudder will be mapped to appropriate standard events of Firebase whereever possible. We map the events as per the following table.

Rudder Event

Firebase Event

Payment Info Entered

add_payment_info

Product Added

add_to_cart

Application Opened

app_open

Checkout Started

begin_checkout

Order Completed

ecommerce_purchase

Order Refunded

purchase_refund

Product Searched

search

Product Shared

share

Product Viewed

view_item

Product List Viewed

view_item_list

Product Removed

remove_from_cart

Checkout Step Viewed

checkout_progress

Apart form the above mentioned events, the following standard events of Firebase are not mapped from any Rudder Event. You can mention the exact names from the following list to be percieved as the standard event in Firebase.

  • campaign_details

  • generate_lead

  • join_group

  • level_end

  • level_start

  • level_up

  • login

  • post_score

  • present_offer

  • select_content

  • sign_up

  • spend_virtual_currency

  • tutorial_begin

  • tutorial_complete

  • unlock_achievement

  • view_search_results

  • earn_virtual_currency

  • set_checkout_option

We will pass all the properties from the event to Firebase. The nested value in the properties will be converted to JSON using GSON.

Screen

The screen call from Rudder will set the current screen name in Firebase using setCurrentScreen method. If you turn on recordScreenViews from RudderConfig, the automatically tracked screens are not passed through this call as Firebase SDK is already doing the same. It will result in duplicate data. Apart from automatic screen views, all other screens are passed through the custom

FAQ

  • if any