Mobile

How to Set Up a GA4 + Firebase Tracking Plan for Your Mobile App

A GA4 + Firebase tracking plan for React Native apps: event names, parameters, key events, consent, debugging and reports that answer real questions.

Hamza El Haissouf

4 min readUpdated EN

A phone and a laptop showing funnel and trend charts, with a printed table of rows on the desk.

Key takeaways

  • Prefer Google's recommended events, such as sign_up, search or purchase, over custom names: GA4 uses their parameters in its standard reports.
  • Register custom parameters as custom dimensions or metrics, or they are collected but never shown in GA4 reports.
  • Never send an email address, phone number or full name in events or user properties.
  • Fix event names before release, because renaming an event later splits your history in two.
  • Link Firebase to BigQuery when you need every raw event joined with your own data.

Short answer

Write five to ten business questions first, then list only the events that answer them: Firebase's automatic events, Google's recommended events, then a few custom ones in snake_case. Mark the two or three that represent success as key events, check every event in DebugView before release, and keep the whole plan in one sheet.

Most mobile apps track too much or too little: every tap, which buries the useful signal, or only installs and crashes, which says nothing about whether people get value from the app. A tracking plan fixes that by starting from the questions the business needs answered, then listing the few events that answer them.

This is the method I use for React Native apps with Firebase Analytics, which feeds Google Analytics 4.

Start from questions, not events

Write down five to ten questions before naming a single event. For example:

  • Where do the users who stay come from?
  • What share of new users finish onboarding?
  • Which feature do retained users use in their first week?
  • Where do people drop out of the booking or purchase flow?
Diagram in five steps: write five to ten questions before naming an event, keep only events that answer one, use the events Firebase logs automatically, prefer Google's recommended events, and mark the two or three that represent success as key events.
Key events are the name Google now uses for conversions in GA4.

Every event in the plan must help answer one of these questions. If it doesn't, leave it out.

Use what Firebase already gives you

Firebase logs some events automatically, such as first_open, session_start, user_engagement and app_update. In React Native, screen changes usually need to be logged by hand from your navigation library (see below).

Then prefer Google's recommended events (sign_up, login, search, select_content, share, begin_checkout, purchase…) over custom names: GA4 understands their parameters and uses them in its standard reports.

The event plan

Layer 1: core events, from day one

EventParametersWhen
screen_viewscreen_name, screen_classEvery navigation
sign_upmethodAccount created
loginmethodSuccessful login
onboarding_completesteps_completedLast onboarding step

Layer 2: engagement

EventParametersWhen
searchsearch_term, results_countUser runs a search
select_contentcontent_type, item_idOpens an item
sharecontent_type, item_id, methodShares content
favorite_add / favorite_removeitem_idSaves or removes an item

Layer 3: business events

EventParametersWhen
contact_requestitem_id, methodContacts the business
begin_checkoutvalue, currency, itemsStarts a payment
purchasetransaction_id, value, currency, itemsPayment confirmed
subscription_startplan, value, currencySubscription confirmed

In GA4, mark the two or three events that represent success as key events, the name Google now uses for conversions.

Naming rules and limits

  • snake_case: letters, numbers and underscores, starting with a letter.
  • Event and parameter names up to 40 characters; parameter values up to 100 characters.
  • Up to 500 distinct event names per app, 25 parameters per event and 25 user properties.
  • Names starting with firebase_, google_ or ga_ are reserved.
  • To see a custom parameter in GA4 reports, register it as a custom dimension or metric. Otherwise it's collected but not shown.
Checklist: snake_case names starting with a letter, event and parameter names up to 40 characters and values up to 100, reserved prefixes firebase_, google_ and ga_, custom parameters registered as custom dimensions, and no email, phone number or full name.
A custom parameter that is not registered is still collected, but it does not show in GA4 reports.

Never send personal data (email address, phone number, full name) in events or user properties: Google's policies forbid it, and you don't need it to answer the questions above.

Implementation in React Native

npm install @react-native-firebase/app @react-native-firebase/analytics
import { getAnalytics, logEvent, setUserProperty } from '@react-native-firebase/analytics';

const analytics = getAnalytics();

// A recommended event with its parameters
await logEvent(analytics, 'select_content', {
  content_type: 'service',
  item_id: 'haircut_45min',
});

// User properties describe the user, not an action
await setUserProperty(analytics, 'plan', 'free');

Log screen views once, from the navigation container, instead of in every screen:

<NavigationContainer
  ref={navigationRef}
  onStateChange={async () => {
    const route = navigationRef.getCurrentRoute();
    if (route && route.name !== lastRouteName.current) {
      lastRouteName.current = route.name;
      await logEvent(analytics, 'screen_view', { screen_name: route.name, screen_class: route.name });
    }
  }}
>

Check every event before release

  • Android: run adb shell setprop debug.firebase.analytics.app <your.package.name>, then open DebugView in GA4 (under Admin).
  • iOS: add -FIRDebugEnabled to the launch arguments of your Xcode scheme.
  • Compare what arrives with the plan: names, parameters, values. Fix mistakes before release: renaming an event later splits your history in two.

If some of your users are in the EU, ask for consent before analytics runs. Firebase supports Consent Mode on mobile: set a default state, then update it from your consent screen (setConsent in @react-native-firebase/analytics).

Reports that answer the questions

  1. Acquisition: where retained users come from, with UTM parameters on your campaign links.
  2. Activation: a funnel exploration from first_open to onboarding_complete to the first key event.
  3. Engagement: which events retained users trigger in their first week.
  4. Retention: the cohort exploration, by week of first open.
  5. Revenue: purchase and subscription_start by source and by plan.

For deeper analysis, link Firebase to BigQuery: you get every raw event and can join it with your own data.

Keep the plan in one sheet

One row per event: name, trigger, parameters with example values, the question it answers, platform, and status (planned, implemented, verified). It's the document developers build from and the one analysts trust.


Want a tracking plan for your app? Book a 30-minute call or see my React Native development service.

Frequently asked questions

What are the naming rules for GA4 and Firebase events?

Use snake_case: letters, numbers and underscores, starting with a letter. Event and parameter names go up to 40 characters, parameter values up to 100, and names starting with firebase_, google_ or ga_ are reserved.

How many events and parameters can a Firebase app have?

Up to 500 distinct event names per app, 25 parameters per event and 25 user properties.

What is a key event in GA4?

It is the name Google now uses for conversions. Mark the two or three events that represent success in your app as key events.

Do I need to log screen views by hand in React Native?

Usually, yes. Firebase logs events such as first_open and session_start automatically, but in React Native screen changes usually need to be logged from your navigation library. Do it once, in the navigation container's onStateChange, instead of in every screen.

How do I see Firebase events in DebugView?

On Android, run adb shell setprop debug.firebase.analytics.app with your package name, then open DebugView in GA4 under Admin. On iOS, add -FIRDebugEnabled to the launch arguments of your Xcode scheme.

Does Firebase Analytics need user consent?

If some of your users are in the EU, ask for consent before analytics runs. Firebase supports Consent Mode on mobile: set a default state, then update it from your consent screen with setConsent in @react-native-firebase/analytics.

Portrait of Hamza El Haissouf

Hamza El Haissouf

Full-stack developer for 6 years · Morocco

I build WhatsApp assistants and websites for private clinics and logistics companies. Remote, in English and French.

See my workAbout meLinkedIn

Related reading