Mobile app analytics: How to implement it step by step

how to implement google analytics for mobile apps

Mobile app analytics is the collection and analysis of data on how people find, use and pay in a mobile app. To implement it, set goals, choose the metrics, write a tracking plan, pick a tool, integrate its SDK, handle consent and privacy declarations, test the events, then build dashboards.

What is mobile app analytics?

Mobile app analytics is the collection and analysis of in-app events and user properties through an SDK, to show how people use an app and how it performs.

Unlike web analytics, which reads page loads in a browser, it depends on events you design: Google Analytics for Firebase, often called Firebase Analytics, logs a few automatically, while event parameters and user properties are yours to define.

On mobile app development projects we write down the questions before naming any event, because an SDK installed first collects data nobody can use. The sequence changes little by platform. How much tooling you need depends on whether your questions stop at funnels or reach campaign attribution.

What can you measure in a mobile app?

You can measure acquisition, usage and engagement, revenue and stability in a mobile app, and each metric needs a written calculation before it reaches a dashboard. Funnel analysis, which counts how many users complete each ordered step toward a goal such as sign-up or purchase, ties the usage metrics together.

The table lists the core metrics in the order a user meets them:

Metric What it tells you How it is calculated
Installs Whether acquisition reaches people Count of first_open events; a reinstall also fires it
Active users How many people use the app in a period Distinct users who engaged with the app in the period; Google Analytics counts a user with an engaged session or a first_open event
Retention Whether users come back Users active on day N ÷ users who first opened the app N days earlier, per cohort
Funnel conversion Where users drop between steps Users completing step N ÷ users completing step N-1, within a fixed window
Channel performance Which campaigns bring users who convert Installs and conversions grouped by UTM parameters
CAC What a paying customer costs to acquire Acquisition spend ÷ new paying customers
CLTV What a customer returns over their lifetime Average revenue per customer × expected lifespan
Crash-free users Stability per release 1 − (users who hit a crash ÷ active users)
App start time How fast the app becomes usable Launch to first rendered screen, read at the median and a slow percentile

UTM parameters are tags on campaign links (utm_source, utm_medium, utm_campaign) that record where a user came from. Firebase Crashlytics is the crash reporter that groups crashes by cause and release and reports crash-free users.

Keep CAC below CLTV, and check it per channel, because a blended average hides the channels that lose money.

Three to five metrics per goal is enough. Raw download totals and session counts are vanity metrics unless a decision hangs on them. Exact definitions vary by tool, so write yours down.

How to implement mobile app analytics: 8 steps

To implement mobile app analytics, work in eight steps: fix the questions and metrics first, write the tracking plan, choose the tool, integrate the SDK, handle consent, test, and build dashboards.

  1. Define the questions the data must answer.
  2. Pick the metrics that answer them.
  3. Write the tracking plan.
  4. Choose the analytics tool.
  5. Integrate the SDK.
  6. Set up consent and store declarations.
  7. Test every event.
  8. Build dashboards and act on them.

Two decisions set this order. Event names come after the questions, because an event with no question behind it produces data nobody queries. Consent comes before collection starts, because an event logged before the user answers has already been collected.

Google Analytics for Firebase is Google's event-based analytics SDK, available at no charge for iOS, Android, Flutter and web. It logs events such as first_open and session_start automatically and accepts custom ones.

Consent management is the mechanism that asks users for permission and gates data collection on their answer. In practice, you integrate Firebase Analytics with collection switched off and enable it once consent is recorded.

Steps 1-2: Which questions must the data answer, and which metrics follow?

Start each analytics goal with one business question, then pick a single primary metric that answers it, plus supporting metrics that explain why the primary one moves. Write the question in plain language first. Event names come after.

Assume a consumer app with email sign-up and a paid subscription. Two questions come up in almost every review of an app like this, and each reduces to one primary metric:

Business question Primary metric Supporting metrics
Where do new users drop out of onboarding? Onboarding completion rate: users who finish onboarding divided by users who open the app for the first time Step-by-step conversion from funnel analysis, time to complete, completion rate by app version and OS
Which acquisition channels bring paying users? Share of new users who make a first purchase, grouped by the utm_source and utm_campaign on the install link Install-to-purchase conversion, campaign spend per paying user, CLTV by channel once enough cohorts have matured

The primary metric gets one owner and one target. Supporting metrics stay on the dashboard only if they help someone diagnose a change in it.

Vanity metrics fail this test. Total downloads, registered user count and raw screen views rise with spend and time, and none of them says where onboarding loses people or which channel pays back.

A useful check before moving on: for every metric on your list, name the decision it changes. If the answer is "none", drop the metric. If a question has no metric, the goal is still vague.

CLTV deserves a caveat. It needs months of cohort data, so use the first-purchase share as the early signal and treat CLTV as confirmation, not the first number you act on.

Step 3: What goes into a tracking plan?

A tracking plan is a shared document that lists every analytics event the app logs, the trigger that fires it, its parameters, and the person who owns it. Event parameters are the details attached to one event, such as value or currency. User properties are attributes of the person that persist across events, such as plan tier or sign-up method.

The rows below come from a sign-up-to-purchase flow, assuming a consumer app that sells items:

Event Trigger Parameters
sign_up_started User opens the registration screen entry_point, method
sign_up_completed Account is created and confirmed by the backend method, entry_point
add_to_cart User adds an item to the basket currency, value, items (item_id, item_name, quantity)
purchase Payment is confirmed by the backend transaction_id, currency, value, items

In the real sheet, add columns for owner, platforms, first release and status. The product manager owns the definition of each event, and one engineer owns its implementation on each platform. A rename goes through the owner, and iOS and Android build the same row.

Firebase Analytics treats event names as case-sensitive, so Sign_Up_Completed and sign_up_completed become two separate events. Use lowercase snake_case everywhere. Reuse Firebase's recommended names where one exists (add_to_cart and purchase here), because standard reports expect them.

Name custom events as the flow step plus its state, as in sign_up_started. The prefixes firebase_, ga_ and google_ are reserved.

Firebase caps both lists: an app can log up to 500 distinct event types, with no limit on total event volume, and a project can hold up to 25 user properties. Add a parameter such as method to an existing event; do not mint sign_up_email_completed and sign_up_apple_completed.

Keep personal data out of both parameters and user properties. Email addresses and names do not belong in the plan. Use an internal, non-guessable user ID and attributes that segment users: plan_tier, signup_method, acquisition_channel.

Step 4: How do you choose an analytics tool?

Use Firebase Analytics as your mobile app analytics tool until your questions outgrow it: multi-step funnels, cohorts, or paid-campaign attribution are the usual triggers for adding a second tool.

Until one of those questions comes up, the free SDK is enough. It logs first_open, session_start and screen_view without extra code, and your tracking plan events sit on top. Crash reporting stays on Firebase Crashlytics whichever analytics tool you add.

The worked example is Firebase with BigQuery export. Linking the project to BigQuery sends raw, event-level data to a warehouse, so an analyst can write SQL for a funnel the console does not draw, or join events with revenue tables.

BigQuery bills for storage and queries, so budget for it. If nobody on the team writes SQL, this route is slower than buying a tool built for the job.

The categories of mobile analytics tools to consider once the free SDK stops answering questions:

  • Product analytics: funnels, cohorts and path analysis in a UI that product managers can use without SQL.
  • Attribution: ties installs and in-app events to the ad network and campaign that produced them.
  • Session replay: shows what users did on a screen where a funnel stalls.
  • Warehouse-based setups: keep events in your own database and join them with CRM and billing data.

Run a second tool alongside Firebase with the same event names from the tracking plan. Switching off the first tool is optional.

Compare user totals with care: Google Analytics counts an active user as one with an engaged session or a first open, and other vendors count active users differently. Every added SDK also adds to what your store declarations must disclose.

Step 5: How do you integrate the SDK?

Integrate the Firebase Analytics SDK in a fixed order: dependencies, collection switch, user ID, then events. Out-of-order setup produces data you cannot repair later.

The Android sequence:

  1. Add google-services.json, the Google Services Gradle plugin, and the Firebase BoM with the firebase-analytics dependency.
  2. If consent comes first, set firebase_analytics_collection_enabled to false in the manifest.
  3. Route every call through one analytics wrapper class. Event names then live in a single file that mirrors the tracking plan, and the same wrapper can sit in front of Flutter or React Native plugins.
  4. Call setUserId right after login and set user properties in the same place, before the first tracked event.
  5. Check the result in DebugView.

Events logged before setUserId carry no user ID, so pre-login funnel steps cannot be tied to the account. For anonymous users on iOS, the identifier for vendors (IDFV) is a device-level ID shared by all apps from one vendor, and it resets when the last of those apps is uninstalled. Treat it as a device signal, not a person.

Double counting comes from manual screen_view calls in onResume or viewDidAppear. The SDK already logs screen transitions, and those callbacks also fire when the app returns from the background. Either remove your manual calls or turn off automatic screen reporting and log screens yourself, but not both.

Offline devices batch events and upload them later, so recent sessions can look incomplete in reports. Compare event timestamps, not arrival time, before you call a session short. Flutter and React Native add one more gap: route changes are not logged automatically, so the plugin needs a navigation observer.

Consent and privacy requirements come down to three things: collection that stays off until the user answers, store declarations that match what the SDK sends, and a legal review for your markets.

Do you need consent? In the EU, storing or reading an identifier on a device generally requires consent under the ePrivacy rules, and GDPR applies to the personal data collected. Elsewhere the answer varies by jurisdiction, and none of the above is legal advice, so have counsel confirm it for each market.

Three platform mechanisms apply, and they are separate:

  • App Tracking Transparency is Apple's framework, required since iOS 14.5, that asks permission before an app tracks users across other companies' apps and websites or reads the advertising identifier. First-party analytics not linked to third-party data typically does not trigger the prompt, and an ATT answer never replaces GDPR consent.
  • Apple App Privacy details are the privacy answers you submit in App Store Connect, including the data collected by third-party SDKs.
  • The Google Play Data safety section is the Play Console form that tells users what data the app collects, shares and protects, SDKs included.

Design against three failure modes:

  1. SDK initialized before consent. With default settings, first_open and session_start are logged before the banner appears. Turn collection off in the Android manifest or Info.plist, then enable it from your consent management code after the user agrees. Firebase also accepts consent signals for analytics storage and ad storage through its consent mode API.
  2. Declarations that drift. A new SDK, or an event parameter that carries a new data type, changes what the app collects. Re-check both store forms before any release that touches analytics.
  3. Missing privacy manifests. Apple expects SDKs to describe their data practices in a privacy manifest. Confirm that every analytics and attribution SDK version you ship includes one.

Step 7: How do you test analytics events?

Test analytics events the way you test any feature: check each one in Firebase DebugView against the tracking plan before release, then repeat the check on every release candidate. DebugView shows the raw events your app logs on a development device as they arrive.

  1. Enable debug mode. On Android, run adb shell setprop debug.firebase.analytics.app <package_name>. On iOS, add -FIRDebugEnabled to the scheme's launch arguments. Events then appear in DebugView within seconds and skip the normal batching delay.
  2. Check parameters against the plan. For every tracking plan row, confirm the event name, parameter names, value types and user properties match exactly, including case. Confirm the user ID is set before the first event fires.
  3. Look for duplicates. Walk each flow once and count: one sign_up_completed, one purchase. A second screen_view for a single screen usually points to a lifecycle hook firing twice.
  4. Test the consent-denied path. Deny consent on a fresh install and confirm nothing reaches DebugView. Then grant consent and confirm events start from that moment.
  5. Re-run on every release. Keep a short checklist for the events that feed your funnels, run it on the release candidate on both platforms, and compare event volumes with the previous version during the first days after release.

A missing or malformed event is a bug. Log it in the same tracker as other defects, assign it to the owner named in the tracking plan, and block the release when the event feeds a primary metric.

Step 8: How do dashboards turn data into decisions?

Dashboards turn data into decisions when each one serves a single role and a single question, and every tile traces to an event in the tracking plan. A shared dashboard with forty tiles answers nothing for anyone.

The views below each map to one owner and one decision:

Role Question Tiles
Product manager Where do users leave onboarding? Funnel analysis from sign_up_started to sign_up_completed, split by platform and app version
Growth manager Which campaigns bring paying users? Purchase events and order value by utm_source and utm_campaign
Mobile lead Did this release break anything? Crash-free users by release, event volume per version against the previous release

Once the events pass testing, a product analytics layer such as Looker Studio on the BigQuery export can host all three views from one event stream. Give each dashboard a named owner and a decision it feeds, such as pausing a campaign or fixing a step.

Firebase Remote Config closes the loop. A dashboard shows a weak step, the team changes a parameter value for one segment without shipping a release, or runs it as an A/B test on a random share of users, and the same funnel shows the effect.

METRO BRAZIL, an ecommerce company selling Brazilian products mainly to customers in the Middle East, had limited analytics on mobile-specific sales in its earlier native apps. In the Flutter app Netguru built to replace them, the team added UTM tracking before launch to monitor mobile-driven sales, and used Firebase's tracking and remote configuration features for targeted updates, A/B testing and real-time optimization.

The published results include a 70% increase in daily active users within the first three months. That gain came with the launch of a new cross-platform app, so it cannot be credited to analytics alone. The tracking is what let the team see which changes worked.

How do iOS and Android analytics differ?

iOS and Android analytics differ in permission model, advertising ID access, store declarations, install attribution, and OS adoption speed, and one tracking plan has to absorb all five.

Area iOS Android
Permission App Tracking Transparency prompt before tracking across other companies' apps or reading the advertising ID No runtime prompt for analytics; apps that use the advertising ID and target Android 13 or later declare the AD_ID permission
Identifiers IDFA only after consent; identifier for vendors (IDFV) works without a prompt but is scoped to one vendor's apps Google advertising ID, which users can reset or delete; Firebase app instance ID resets on reinstall
Declaration Apple App Privacy details in App Store Connect, plus privacy manifests for SDKs Google Play Data safety section in Play Console
Attribution SKAdNetwork, now AdAttributionKit on recent iOS: aggregated, delayed postbacks Play Install Referrer API: campaign parameters on each install
Adoption speed New OS versions tend to reach most devices quickly, so SDK support for old versions can be dropped sooner Versions spread across manufacturers and carriers, so older API levels stay in your user base longer

The attribution row has the largest effect on reporting. Android's install referrer gives you the campaign behind each install, while iOS postbacks are aggregated and arrive late. Campaign comparisons are therefore more reliable within a platform than across the two.

Log platform as a user property and keep event names identical on both. Where iOS users decline the ATT prompt, IDFV still supports per-user funnels in your own app, though it cannot link behavior to ads or to other vendors' apps.

Both stores require declarations that cover third-party SDK data, and the two forms are not interchangeable. Have legal review each one against what your SDKs collect.

Which mistakes make app analytics data useless?

Six mistakes make app analytics data useless: events with no question behind them, no owner, platform-specific event names, no tests, undeclared SDK data, and averages without segments. Each has a fix that costs less than the decisions it protects.

  • Collecting everything. A team logs every tap and then can't tell which events answer which question. Fix: keep an event in the tracking plan only if a named decision depends on it, and delete the rest.
  • No owner. Nobody notices when an event stops firing or changes meaning. Fix: give every row in the tracking plan one owner, and route any change to an event's trigger or parameters through that person.
  • Renamed events across platforms. iOS logs signup_complete and Android logs sign_up_completed, so one funnel splits into two partial ones. Event names are case-sensitive in Firebase, so even a capital letter forks the data. Fix: set one naming convention in the plan and generate the event constants for both platforms from it.
  • No tests. Analytics breaks silently after a refactor. Fix: treat a broken event as a bug, verify it in DebugView before release, and rerun the checks on every release.
  • Undeclared SDK data. An analytics or ad SDK collects fields that the Google Play Data safety section and Apple's App Privacy details don't mention, or it starts before consent management has an answer. Fix: audit what each SDK collects on every release, update the declarations, and delay initialization until consent is given. Have legal review the wording.
  • Averages without segments. A blended session length mixes new and returning users, platforms and channels. An active-user count treats a brief visit and a daily habit as the same thing. Fix: split every headline metric by platform, app version, acquisition source and new versus returning before acting on it.

Mobile app analytics FAQ

What is the best mobile app analytics tool?

The best mobile app analytics tool is the one that answers your launch questions at a cost you can sustain. Firebase Analytics covers event-based reporting at no charge, while a dedicated product analytics tool suits funnel and cohort questions on user-level data. Switch only when a question goes unanswered.

Can Google Analytics track mobile apps?

Yes, Google Analytics 4 tracks mobile apps once the Firebase SDK is added to the iOS or Android build. The SDK logs first_open, session_start, and screen_view automatically, and you add custom events for everything else. Raw event data needs the BigQuery export, which you enable separately in the Firebase console.

How many events should a mobile app track at launch?

Track one event per step of the two or three funnels that answer your launch questions, plus the events the SDK collects automatically. Every extra event needs a trigger, parameters, and an owner in the tracking plan. Stay well below the cap Firebase sets on distinct event types, because names are case-sensitive and near-duplicates count separately.
For users in the EU, generally yes: the ePrivacy rules require consent before an SDK stores or reads an identifier on the device, and GDPR covers the personal data it collects. Consent management should hold collection until the user answers, which Firebase supports by disabling Analytics collection at startup. Requirements vary by jurisdiction and data type, so get legal review.

When should analytics be added to a new app?

Add analytics in the first build that real users can install, with the tracking plan written before the first screen is coded. Firebase logs first_open only for installs of a build that already contains the SDK, so earlier installs never appear in reports. Starting later leaves a baseline gap you cannot backfill.

Next step: Turn the plan into a working setup

Start the working setup with a tracking plan for your first three questions, then add Firebase Analytics behind consent and check every event in DebugView before release. Begin with the events those questions need, and add more only when a new question requires them.

If you want a team to set up mobile app analytics with you, from the tracking plan through SDK integration to dashboards, tell us about your app and we will scope the work.

We're Netguru

At Netguru we specialize in designing, building, shipping and scaling beautiful, usable products with blazing-fast efficiency.

Let's talk business