Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Firebase vs Google Analytics vs Google Tag Manager: what each one does in your app

When it comes to tracking what happens inside your app, three Google tools usually come up: Firebase, Google Analytics (GA4), and Google Tag Manager (GTM). They sound similar, and it's easy to mix them up. This guide explains what each one does, which questions each one answers, and what (if anything) you need to set up.

The short version:

  • Google Analytics (GA4) tells you what people do: pageviews, events, purchases, conversions.
  • Firebase tells you how many people use your app and how often they come back: daily, weekly, and monthly active users, installs, and retention.
  • Google Tag Manager (GTM) is not an analytics tool at all. It's a tool for managing tags (small snippets of tracking code) on your website. In the context of your app, it's simply one of the ways to tell GA4 which visits came from the app.

Why your existing Google Analytics already works in the app

Your MobiLoud app loads your existing website inside a native app. That means everything already running on your site keeps running inside the app, including Google Analytics, your marketing pixels, and any other analytics tool you use.

So there is nothing to "integrate". If GA4 is tracking your website today, it is also tracking every pageview, event, and purchase that happens inside your app, automatically.

This applies to other web analytics tools too. If you use Mixpanel, PostHog, or anything similar on your site, it keeps working inside the app in exactly the same way.

The one thing GA4 can't do on its own: tell app traffic apart from web traffic

Out of the box, GA4 sees app visits and regular website visits as the same thing, because the app is showing your website. To separate them, we use a simple trick: every page loaded inside the app carries the word canvas in its user agent (the browser identification string).

You can use that to create a custom dimension in GA4 called app_session. Once it's set up, app visits show app_session = true and regular web visits show (not set). From there you can build reports, segments, and comparisons for app users only.

There are two ways to set this up, and we have a step-by-step guide for each:

  • If you use Google Tag Manager: follow our guide at Track app data in Google Analytics with Google Tag Manager. You'll create one variable and one tag in GTM, and that's it.
  • If you don't use Google Tag Manager: you can do the same thing with a small change to your regular GA4 tracking snippet, no GTM needed. First, create the custom dimension in GA4 (Admin > Custom Definitions > Custom Dimensions) with the name app_session, scope set to User, and user property app_session. Then replace your standard GA4 snippet with this version, using your own Measurement ID in place of G-XXXXXXXXXX:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag() {
    dataLayer.push(arguments);
  }
  gtag('js', new Date());
  var isApp = navigator.userAgent.toLowerCase().indexOf('canvas') > -1;
  var config = {};
  if (isApp) {
    config.user_properties = { app_session: 'true' };
  }
  gtag('config', 'G-XXXXXXXXXX', config);
</script>

Important: this snippet replaces your standard GA4 tag, it should not be added alongside it. Running two GA4 tags at the same time will double-count your traffic. If you're not sure, reach out to us and we'll set it up for you.

In both cases, the app_session custom dimension needs to exist in GA4 first, and reports take around 24 hours to start showing data.

Where Google Tag Manager fits in

This is the most common point of confusion, so let's be clear: GTM does not collect or report any data by itself. It's a container that holds and fires tags on your website, one of which is usually your GA4 tag.

For your app, GTM matters in exactly one way. If you already use it, it's the most convenient place to add the app_session setup described above. If you don't use GTM, you don't need to add it just for your app. The direct snippet method works just as well.

What Firebase gives you, with zero setup

Every MobiLoud app ships with Firebase Analytics (also called Google Analytics for Firebase) already built in and active. You don't need to configure anything. Out of the box it reports:

  • Active users: daily, weekly, and monthly (DAU, WAU, MAU), the headline numbers for how your app is doing.
  • Retention: how many users come back in the weeks after installing.
  • App lifecycle events: first opens (new installs being used for the first time), sessions, and uninstalls (Android only).
  • Engagement time at the app level.
  • Audience breakdowns: device, operating system version, country, and app version.

What Firebase will not show you is what people do inside the app. Firebase is native code, and it can't see the pages and actions happening inside the web view. Pageviews, content engagement, and purchases only appear in your web analytics (GA4 or whichever tool you use).

Why Firebase numbers are often more accurate for user counts

On most websites, especially those with visitors from the EU, GA4 only runs after a visitor accepts the cookie consent prompt. It's also affected by ad blockers and browser tracking protections. Every visitor who declines consent or blocks the script is invisible to GA4, so web-based user counts tend to be lower than reality.

Firebase measures at the native app level. It doesn't depend on cookies, consent banners, or browser behavior, so its active user and retention numbers are much closer to the true figures.

A good rule of thumb: when you want to know how many people use your app, trust Firebase. When you want to know what those people are doing, look at GA4.

"Do I need to integrate Google Analytics for Firebase?"

If you've come across the Google Analytics for Firebase integration page and are wondering whether it needs to be connected to your app, the answer is no. There is nothing to set up, because you already have everything:

  1. Your website's Google Analytics is already tracking behavior inside the app, since the app loads your website.
  2. Google Analytics for Firebase is already active in every MobiLoud app, tracking app-level metrics like active users, installs across iOS and Android, and retention.

These two work side by side and answer different questions. There is no third integration to add.

See also
No items found.