Skip to main content

Firebase Tracking Guidelines

Updated over 2 weeks ago

At a glance: Setting up Firebase tracking correctly is essential to extracting all your app data to Cost Center. Follow the guidelines below for different tracking objectives.

Event tracking guidelines:

Cost Center (CC) can be used along with Firebase in the following scenarios:

  1. Tracking ad revenue for Admob Mediation (user level)

  2. Realtime ad revenue tracking for apps using IronSource / Max Mediation:

    • CC uses data from the API by default

    • On days when data is unavailable, CC will use data from Firebase.

  3. Using IronSource / Admob Mediation but having additional ad revenue from other sources (i.e. App Open/Native ads from Admob)

  4. Tracking IAP revenue in case the default Firebase event in_app_purchase is not available

  5. Level Analytics


Admob Mediation

When using Admob Mediation, ad-impression-level revenue needs to be posted into a Firebase event*

2. Ping impression-level ad revenue to Firebase (event ad_revenue_sdk) with the following parameters:

  • value

  • currency

  • ad_format (banner / interstitial / rewarded_video / app_open / native / rewarded_inter)

  • level

  • level_mode

  • ab_test_name

  • ab_test_variant

Sample code can be found here.

Note

An app update is required to export ad impression revenue to BigQuery.

3. Create a Firebase Ad Revenue connector in Cost Center.

4. Set No for “Is this a real-time revenue source?”

5. Link this connector to the app.

* Firebase auto-tracks this revenue into event ad_impression. However, this event is not exported to BigQuery so ad impression revenue needs to be tracked as a separate event.


​** Real-time ad impression revenue may not always match the actual revenue shown in the AdMob dashboard. This is because AdMob can filter out invalid traffic. Additionally, if an app is updated to support real-time ad impression tracking, revenue from users who haven't yet updated may go untracked.

To bring the AdMob revenue in Cost Center closer to the figures shown in the AdMob dashboard, you can:

  1. Add the connector Mediation Service > AdMob Mediation (Aggregated).

  2. Link it to your app.

  3. Then, in App Settings, enable "Sync Firebase Ad Revenue and AdMob Mediation."


Realtime Ad Revenue tracking for IronSource / Max Mediation

Tracking impression-level ad revenue to Firebase with parameters similar to tracking for Admob Mediation (event ad_revenue_sdk). Guidelines can be found here.

If there are any additional ad revenue sources (i.e App Open / Native Ads), it should also be tracked in this event. Refer to section on "Additional Ad Revenue" below.

1. Create a Firebase Ad Revenue connector in Cost Center.

2. Set Yes for “Is this a real-time revenue source?”.

3. Link this connector to the app.


Additional Ad Revenue (i.e. App Open / Native Ads)

Track these revenues to a Firebase event with parameters similar to tracking for Admob Mediation (must be a different event from the real-time ad revenue tracking).

1. Create a Firebase Ad Revenue connector in Cost Center

2. Set No for “Is this a real-time revenue source?”

3. Link this connector to the app.


IAP Revenue

Track all IAP revenue to event iap_sdk with the following parameters:

  • value

  • currency

  • level

  • level_mode

Please refer to our guidelines on the iap_sdk for configuration here


Level Analytics

Use Level Analytics to analyse game-level performance. There are 4 events required:

  • level_start

  • level_end

  • iap_sdk

  • ad_revenue_sdk

Please refer to our guidelines on the Firebase setup for Level Analytics here.

Note

For Level Analytics, kindly ignore event ad_revenue_sdk and/or iap_sdk if they’re already tracked above.

Did this answer your question?