Firebase Analytics — Event Tracking and A/B Testing for Apps That Sell
> cd .. / HUB_EDITORIALE
Sviluppo di siti web

Firebase Analytics — Event Tracking and A/B Testing for Apps That Sell

[2026-07-29] Author: Ing. Calogero Bono
> share
Zenithby Meteora Web The operating system for your business. Social, clients, bookings and invoices in one platform. Gyms, barbers, professionals. Discover Zenith Free demo · no card

Your app generates leads, orders or subscriptions. But you don't know exactly how many users reach checkout, how many abandon after seeing a price, or which button color converts better. Without this data every decision is a guess. We at Meteora Web work daily with Firebase Analytics and the same approach we bring to financial statements: measure first, optimize later. Here we show you how to turn events and A/B tests into concrete business choices.

Why Firebase Analytics Over Expensive Alternatives?

Google Analytics 4 for apps requires complex setup and a separate tag manager. Firebase Analytics is natively integrated with Firebase — zero extra cost, automatic events ready out-of-the-box (first open, purchase, crash) and a unified dashboard. For a small business that needs to get started immediately, it's the fastest path. We use it even for Laravel web apps via the Web SDK, not just mobile.

What data can you get without writing code?

Firebase Analytics automatically tracks: sessions, active users, screen events, crashes, in-app purchases (if configured). But the real value comes when you define custom events: 'add_to_cart', 'begin_checkout', 'purchase'. On these you later build A/B tests with Firebase Remote Config and A/B Testing.

Sponsored Protocol

How much does Firebase Analytics cost for your app?

Zero EUR. Event collection is unlimited, no cost per user or per million hits. The only potential cost is the Firebase Blaze plan if you exceed free limits for Cloud Functions or Firestore, but Analytics remains free. We work with clients who have tens of thousands of users and have never paid a cent for analytic data.

How to Set Up Custom Events in Firebase Analytics with Working Code?

Let's start with a concrete scenario: a fashion e-commerce app. We want to know how many users click the 'Discover the collection' button and then actually view a product. With this data you can calculate the drop-off rate between content and product.

SDK Installation (Web React example)

// npm install firebase
import { initializeApp } from 'firebase/app';
import { getAnalytics, logEvent } from 'firebase/analytics';

const firebaseConfig = {
  apiKey: "AIza...",
  authDomain: "your-app.firebaseapp.com",
  projectId: "your-app",
  // ...
};

const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);

Tracking a custom event

function onDiscoverCollection() {
  logEvent(analytics, 'discover_collection', {
    category: 'new_summer_collection',
    source: 'homepage_card'
  });
  // then navigate
}

Product view event

function onViewProduct(product) {
  logEvent(analytics, 'view_item', {
    currency: 'EUR',
    value: product.price,
    items: [{
      item_id: product.id,
      item_name: product.name,
      item_category: product.category
    }]
  });
}

Verify in Firebase console

After 24-48 hours you'll see the events in Analytics → Events. You can also use DebugView in real time during development (enable debug with firebase.analytics().setAnalyticsCollectionEnabled(true) on Android/iOS).

Sponsored Protocol

How to Run an A/B Test in Firebase Analytics for Your App?

Firebase A/B Testing lets you compare two variants of a feature (e.g., button color, text, position) measuring impact on the target event. It's not a visual test like Google Optimize; it tests remote parameters. Here's how: define a condition (e.g., user in Italy), randomly assign two groups (A=control, B=variant), and Firebase shows aggregated results.

Sponsored Protocol

Configure Remote Config for the test

// Fetch remote parameter
import { getRemoteConfig, getValue } from 'firebase/remote-config';
const remoteConfig = getRemoteConfig(app);
remoteConfig.fetchAndActivate().then(() => {
  const buttonColor = getValue(remoteConfig, 'button_color').asString();
  // Apply color to button
});

Create an experiment in Firebase console

  1. Go to A/B Testing → Create experiment
  2. Name: 'Test checkout button color'
  3. Choose Remote Config type
  4. Parameter: button_color
  5. Variant A: value 'green', Variant B: value 'blue'
  6. Goal: event 'purchase' or 'begin_checkout'
  7. Traffic percentage: 50% per variant
  8. Start experiment

After a few days Firebase will show the probability of outperformance of variant B over A, with confidence interval.

Sponsored Protocol

How many users do you need for a meaningful A/B test?

No magic number, but rule of thumb: at least 1000 target events per variant. If your app has 10,000 active users and 10% reach checkout, you'll have 1000 events after about 10 days. With fewer data results may be random. We recommend testing only changes that could drive at least a 10% improvement in conversion rate — otherwise it's not worth the time.

Which Events to Track to Avoid Data Overload?

Common mistake: track everything, hoping data will speak. We always start from the business model. For a booking app (salons, restaurants) key events are: start_booking, booking_completed, cancelled, review_left. For a fitness app: sign_up, subscription_activated, workout_completed, renewal_expired. Add interaction events that help understand the funnel (e.g., 'click_CTA_button', 'scroll_80%').

Sponsored Protocol

How to organize events cleanly

  • Use consistent snake_case or camelCase names (no spaces versions)
  • Include useful parameters but not excessive: for 'purchase_completed' include value, currency, order ID — not the whole cart
  • Avoid personal data (email, phone) — Firebase Analytics doesn't accept them and you risk GDPR penalties

What to Do Now

  1. Integrate Firebase SDK in your app (Web or mobile) and enable Analytics
  2. Define 3-5 custom events based on your conversion funnel
  3. Verify with DebugView that events arrive correctly
  4. Create a first A/B test on a critical element (color, text, flow)
  5. Analyze results after 7-10 days and implement the winning variant

To dive deeper into the Firebase ecosystem, read our pillar guide on Firebase for web and mobile apps. And if you're a professional who needs to structure contact management, check our article on CRM for professionals — same data-driven approach.

> share
Ing. Calogero Bono

> AUTHOR_EXTRACTED

Ing. Calogero Bono

Ingegnere informatico, fondatore di Meteora Web e Zenith OS. System administrator e progettista di piattaforme, app e CMS proprietari, con esperienza in sviluppo full-stack, marketing digitale ed ecosistema Google.
[ Read Full Dossier ]

> METEORA_WEB // DIGITAL AGENCY

We build the digital presence your business deserves.

Websites, social media, online advertising, e-commerce and high-performance hosting, engineered with method by computer engineers in Sciacca, for all of Italy.

> MW_JOURNAL

> READ_ALL()