Skip to main content
RapidDev - Software Development Agency
flutterflow-integrationsFlutterFlow Native Integration

Google Analytics

Connect FlutterFlow to Google Analytics using the built-in Firebase Analytics native toggle — go to Settings & Integrations → Firebase → enable Google Analytics to auto-wire GA4 tracking. For reading report data back into your app, you need a Cloud Function proxy to the GA4 Data API since service-account credentials must never live in Dart code.

What you'll learn

  • How to enable Google Analytics 4 tracking using FlutterFlow's native Firebase toggle
  • How to log custom events (signups, purchases, button taps) from Action Flows
  • How to verify event data in Firebase DebugView on a real device
  • Why the GA4 Data API requires a Cloud Function proxy and how to set one up
  • The difference between the Measurement ID (web gtag) and the Firebase mobile flow
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner14 min read20 minutesAnalyticsLast updated July 2026RapidDev Engineering Team
TL;DR

Connect FlutterFlow to Google Analytics using the built-in Firebase Analytics native toggle — go to Settings & Integrations → Firebase → enable Google Analytics to auto-wire GA4 tracking. For reading report data back into your app, you need a Cloud Function proxy to the GA4 Data API since service-account credentials must never live in Dart code.

Quick facts about this guide
FactValue
ToolGoogle Analytics
CategoryAnalytics
MethodFlutterFlow Native Integration
DifficultyBeginner
Time required20 minutes
Last updatedJuly 2026

Two Completely Different Jobs: Tracking vs. Reporting

When founders search 'connect FlutterFlow to Google Analytics,' they usually mean one of two very different things. The first — and most common — is tracking app usage: logging which screens users visit, which buttons they tap, and which purchases they complete. For this, FlutterFlow has a native Firebase Analytics toggle that does almost all the work for you. Google Analytics 4 is free for standard use, and the `firebase_analytics` package it wires up automatically logs `screen_view` events every time your user navigates to a new page.

The second job is reading report data back into your FlutterFlow app — for example, showing a dashboard screen with session counts or top pages. That is a fundamentally different operation: it requires the GA4 Data API (`analyticsdata.googleapis.com/v1beta`), OAuth2 or a service account, and a backend proxy. You cannot call it from a Dart API Call because the service-account JSON credential would ship inside your compiled app binary and be extractable by anyone who downloads it.

One common trap: founders paste a Measurement ID (the G-XXXX string from a web gtag snippet) into an API Call expecting it to send events. That ID is for the web JavaScript library, not the Firebase mobile path. FlutterFlow's native toggle links to the Firebase project's GA4 property automatically — you do not need to paste the Measurement ID anywhere.

Integration method

FlutterFlow Native Integration

FlutterFlow has a built-in Firebase Analytics toggle that wires the `firebase_analytics` package directly into your app build. Enabling it in Settings & Integrations → Firebase → Google Analytics automatically handles screen tracking. For custom event logging, you add 'Log Event' actions from the Action Flow Editor. Reading GA4 report data back into a screen requires the GA4 Data API, which needs a server-side proxy because service-account credentials cannot be embedded in client code.

Prerequisites

  • A FlutterFlow project with Firebase already connected (Firebase project linked in Settings & Integrations → Firebase)
  • A Google Analytics 4 property (auto-created when you enable Analytics in Firebase Console, or linked manually)
  • A Google account with Editor or Administrator access to the Firebase project
  • For the GA4 Data API reporting path: a Google Cloud service account with the 'Viewer' role on your GA4 property
  • For the Cloud Function proxy: Firebase CLI set up (or a colleague who can deploy functions on your behalf)

Step-by-step guide

1

Enable Google Analytics in FlutterFlow's Firebase Settings

Open your FlutterFlow project and click on Settings & Integrations in the left navigation panel. Scroll down to the Firebase section and look for the 'Google Analytics' toggle — it should be listed under the Firebase integration options alongside Firestore, Authentication, and Storage. Click the toggle to enable it. Behind the scenes, FlutterFlow adds the `firebase_analytics` pub.dev package to your project dependencies and updates the Firebase configuration files (`google-services.json` for Android and `GoogleService-Info.plist` for iOS) to include your GA4 property ID. If the toggle is greyed out or you don't see it, it usually means your Firebase project does not yet have a linked GA4 property. Go to the Firebase Console (console.firebase.google.com), open your project, click the gear icon → Project Settings → Integrations → Google Analytics, and link or create a GA4 property. Come back to FlutterFlow and the toggle will be available. Once enabled, FlutterFlow automatically logs `screen_view` events every time a user navigates to a new page in your app. You do not need to add any manual actions for basic screen tracking — the package handles that automatically in the generated Flutter code. Important: the Measurement ID (the G-XXXX string you see in GA4's web data stream settings) is for the JavaScript gtag library on websites. Do not paste it anywhere in FlutterFlow. The mobile tracking goes through Firebase using the project credentials in your config files, not a Measurement ID.

Pro tip: After enabling the toggle, do a Test Mode build and open Firebase Console → Analytics → DebugView. Tap around your app and watch events arrive in real time. If nothing shows after 2 minutes, make sure you're testing on a real device, not the FF web preview.

Expected result: The Google Analytics toggle shows as enabled (blue/active) in Settings & Integrations → Firebase, and a test build of your app begins sending `screen_view` events visible in Firebase Console → Analytics → DebugView.

2

Add Custom Event Logging to Action Flows

Automatic screen tracking is a great start, but real insight comes from logging custom events at meaningful moments: when a user signs up, completes a purchase, clicks a key button, or finishes an onboarding step. FlutterFlow exposes this through the Action Flow Editor under an 'Analytics' action category. To add a custom event: tap the widget you want to track (for example, a 'Complete Purchase' button), then open its Actions panel on the right side. Click '+ Add Action', search for 'Log Event' (it appears under the Analytics category), and select it. In the action settings, enter your event name. GA4 event names must be snake_case, under 40 characters, and must not use reserved names like `screen_view`, `session_start`, `first_open`, or `app_remove`. Good examples: `purchase_complete`, `signup_finished`, `tutorial_step_complete`. You can also add event parameters — key-value pairs that give the event context. For a purchase event, add parameters like `currency` (string), `value` (number), and `item_name` (string). In the parameter value fields, you can bind dynamic values from your app state or page variables so each event carries real data. For events that should fire when a screen loads rather than when a button is tapped, add the Log Event action to the page's On Page Load action chain instead of a button. This is useful for tracking which screens are most visited beyond what automatic screen tracking gives you. Avoid logging too many events or events with high-cardinality parameter values (like per-user unique IDs in every event) — GA4 has limits on the number of distinct event types and parameters per property.

Pro tip: GA4 standard reports can take up to 24 hours to show new events. For same-day verification, always use Firebase Console → Analytics → DebugView or the Realtime report, which shows events within seconds.

Expected result: When you tap the instrumented widget in a test device build, a custom event appears in Firebase Console → Analytics → DebugView with your event name and parameters visible.

3

Verify Events on a Real Device Using DebugView

Testing Google Analytics events from FlutterFlow requires a real device or a Test Mode build. The web preview in FlutterFlow's Run mode does not reliably send Firebase Analytics events — the analytics package is designed for mobile builds, and DebugView specifically targets devices. To put your device into DebugView mode, you need a Test Mode build. In FlutterFlow, click the Test/Run toggle in the top right and choose 'Test'. Install the resulting build on your Android or iOS device using the QR code or direct download. Once the app is open on your device, go to Firebase Console → Analytics → DebugView. You should see your device listed within a minute or two. Tap around your app and log custom events — each one appears in real time in DebugView with its name, parameters, and timestamp. If your device does not appear in DebugView: - Check that you used a Test Mode build, not the web preview. - Make sure the device has an internet connection. - Wait up to 2-3 minutes for the initial connection. - Verify the Google Analytics toggle is still enabled in FlutterFlow's Firebase settings (occasionally toggling off after a project refresh). For iOS builds, be aware that analytics data may under-report if you have not implemented App Tracking Transparency (ATT) consent. iOS 14.5+ requires apps that use data for tracking purposes to request permission. Without proper consent handling, analytics tied to IDFA-based signals may be limited. For most event logging (non-ad-related tracking), this is less of an issue, but it's worth noting if your GA4 numbers seem lower than expected on iOS. Once you've confirmed events are flowing correctly, you can set up conversion events in the GA4 property settings (Firebase Console → Analytics → Events → mark as conversion) to track key business moments like purchases or completed signups.

Pro tip: Standard GA4 reports update once per day. If you're showing stakeholders 'live' data, point them to the GA4 Realtime report (Firebase Console → Analytics → Realtime) which shows the last 30 minutes.

Expected result: Your device appears in Firebase Console → Analytics → DebugView, and tapping instrumented widgets shows your custom events with correct parameters in real time.

4

(Optional) Pull GA4 Report Data into Your App via a Cloud Function Proxy

If you want to display GA4 metrics inside your FlutterFlow app — for example, showing an admin screen with today's active users, top pages, or session counts — you'll need to call the GA4 Data API (`analyticsdata.googleapis.com/v1beta`). This API uses OAuth2 or a service account for authentication, which means the credential is a sensitive JSON file that must never be embedded in your compiled app. The safe approach is a Firebase Cloud Function that holds the service-account credential and acts as a proxy between your FlutterFlow app and the GA4 Data API. Here is a minimal example: First, create a service account in Google Cloud Console with the 'Viewer' role on your GA4 property. Download the JSON key file. Add it to your Cloud Functions project (never commit it to a public repository). Deploy a Cloud Function that imports the `@google-analytics/data` Node.js library, authenticates using the service account, queries the GA4 Data API for your metrics, and returns a clean JSON response to the FlutterFlow API Call. In FlutterFlow, create an API Group pointing to your deployed Cloud Function URL (left nav → API Calls → + Add → Create API Group). Add an API Call (GET) with no sensitive headers — the secret is already inside the Cloud Function. In the Response & Test tab, paste the sample response from a test call and click 'Generate JSON Paths' to extract the metric values. Bind these values to widgets on your dashboard screen via a Backend Query. This pattern keeps your service-account credential completely off the device, while still letting your app display real GA4 metrics.

index.js
1// Firebase Cloud Function proxy for GA4 Data API
2// functions/index.js
3const functions = require('firebase-functions');
4const { BetaAnalyticsDataClient } = require('@google-analytics/data');
5
6const analyticsClient = new BetaAnalyticsDataClient({
7 keyFilename: './service-account.json' // stored in your functions/ directory
8});
9
10exports.getGA4Metrics = functions.https.onRequest(async (req, res) => {
11 res.set('Access-Control-Allow-Origin', '*');
12 if (req.method === 'OPTIONS') {
13 res.set('Access-Control-Allow-Methods', 'GET');
14 res.set('Access-Control-Allow-Headers', 'Content-Type');
15 return res.status(204).send('');
16 }
17
18 const propertyId = 'YOUR_GA4_PROPERTY_ID'; // e.g. '123456789'
19
20 try {
21 const [response] = await analyticsClient.runReport({
22 property: `properties/${propertyId}`,
23 dateRanges: [{ startDate: 'today', endDate: 'today' }],
24 metrics: [
25 { name: 'activeUsers' },
26 { name: 'sessions' }
27 ]
28 });
29
30 const metrics = {};
31 response.rows.forEach(row => {
32 row.metricValues.forEach((val, idx) => {
33 metrics[response.metricHeaders[idx].name] = val.value;
34 });
35 });
36
37 return res.json({ success: true, data: metrics });
38 } catch (err) {
39 console.error('GA4 Data API error:', err);
40 return res.status(500).json({ success: false, error: err.message });
41 }
42});

Pro tip: If you'd rather skip writing Cloud Functions yourself, RapidDev's team builds FlutterFlow integrations like this every week — free scoping call at rapidevelopers.com/contact.

Expected result: Your FlutterFlow dashboard screen fetches active user counts and session numbers from the Cloud Function and displays them in text or stat card widgets, updating each time the screen loads.

Common use cases

E-commerce app that tracks purchases and abandoned carts

A FlutterFlow shopping app can log a custom 'purchase' event with revenue and item parameters every time a user completes checkout, and an 'add_to_cart' event when items are added. These events feed GA4's e-commerce reports automatically, letting you see funnel drop-off without any third-party analytics service.

FlutterFlow Prompt

Build a shopping app where tapping 'Buy Now' logs a GA4 purchase event with product name, price, and currency parameters, and shows a confirmation screen.

Copy this prompt to try it in FlutterFlow

SaaS onboarding app that tracks signup funnel steps

Track how many users complete each step of a multi-screen onboarding flow by logging a custom event at each screen transition. GA4's funnel exploration report will show exactly where users drop off, letting you prioritize UX improvements on the weakest steps.

FlutterFlow Prompt

Create a 4-step onboarding flow where each step completion fires a custom GA4 event named 'onboarding_step_complete' with a 'step_number' parameter.

Copy this prompt to try it in FlutterFlow

Admin dashboard screen showing live GA4 session metrics

An internal FlutterFlow app for a marketing team pulls today's active users and session counts from the GA4 Data API via a Cloud Function proxy, displaying them in a card on a dashboard screen. The Cloud Function holds the service-account credential so no sensitive keys ever appear in the app binary.

FlutterFlow Prompt

Build a dashboard screen that shows today's active user count and total sessions fetched from the GA4 Data API, refreshed each time the screen loads.

Copy this prompt to try it in FlutterFlow

Troubleshooting

Events are not showing up in Firebase DebugView after enabling the Google Analytics toggle

Cause: DebugView only receives events from real device builds, not from the FlutterFlow web Run mode preview. The `firebase_analytics` package requires a compiled mobile app.

Solution: Use FlutterFlow's Test Mode to create a device build, install it on a real Android or iOS device, and then check Firebase Console → Analytics → DebugView. Allow 2-3 minutes for the device to register.

The Google Analytics toggle in FlutterFlow Settings → Firebase is greyed out and cannot be enabled

Cause: Your Firebase project does not have a linked Google Analytics (GA4) property. This can happen with older Firebase projects created before GA4, or when the Firebase project was created without selecting GA4 during setup.

Solution: Go to Firebase Console → your project → Project Settings (gear icon) → Integrations → Google Analytics → Link to an existing or create a new GA4 property. Once linked, return to FlutterFlow and the toggle will become available.

GA4 standard reports show no data 48 hours after enabling tracking

Cause: Either the device build wasn't used for testing (web preview doesn't reliably send events), the Firebase config files weren't updated after enabling the toggle, or the GA4 property isn't linked to the Firebase project correctly.

Solution: Confirm events arrive in DebugView first (real device, Test Mode build). If DebugView shows events but standard reports don't update after 24 hours, check Firebase Console → Analytics → Events to confirm event names appear there. Standard reports lag by up to 24 hours — use the Realtime report for same-day validation.

Cloud Function proxy for the GA4 Data API returns 'PERMISSION_DENIED' or 403 errors

Cause: The service account used in the Cloud Function does not have the 'Viewer' role on the GA4 property, or the Google Analytics Data API has not been enabled in the Google Cloud project.

Solution: Go to Google Cloud Console → IAM → find your service account → verify it has the 'Viewer' (or higher) role on the GA4 property in Google Analytics Admin. Also go to APIs & Services → Library and enable 'Google Analytics Data API' for your project. Re-deploy the Cloud Function after making these changes.

Best practices

  • Always verify events in Firebase DebugView on a real device before considering the integration complete — the web preview does not reliably send analytics events.
  • Use snake_case event names under 40 characters and avoid GA4 reserved names (screen_view, session_start, first_open) to prevent events from being silently dropped.
  • Never paste a service-account JSON key into an API Call header or a Dart custom action — always route Data API calls through a Firebase Cloud Function.
  • Add no more than 25 parameters per event and keep parameter names under 40 characters; GA4 silently drops parameters that exceed these limits.
  • Use the GA4 Realtime report or DebugView for immediate feedback during development; standard reports take up to 24 hours to reflect new events.
  • Mark your most important user actions (purchase, signup, activation) as conversion events in the GA4 property settings so they appear in conversion reports automatically.
  • For iOS, implement App Tracking Transparency (ATT) consent if your analytics data is used for advertising purposes — without it, IDFA-based signals may be blocked on iOS 14.5+ devices.

Alternatives

Frequently asked questions

Do I need to add the Measurement ID (G-XXXX) anywhere in FlutterFlow?

No. The Measurement ID (G-XXXX) is for the JavaScript gtag.js library used on websites. FlutterFlow's native Firebase Analytics integration uses the credentials in your `google-services.json` (Android) and `GoogleService-Info.plist` (iOS) files, which are automatically configured when you link your Firebase project. You do not paste the Measurement ID into FlutterFlow anywhere.

Will Google Analytics track screen views automatically, or do I need to add actions to every page?

Automatic screen tracking is enabled by default once you turn on the Google Analytics toggle in FlutterFlow's Firebase settings. The `firebase_analytics` package logs a `screen_view` event every time your user navigates to a new page in the app. You only need to add manual 'Log Event' actions for custom business events like purchases, signups, or button taps that you want to track beyond navigation.

How long does it take for events to appear in Google Analytics reports?

Firebase DebugView and the GA4 Realtime report show events within a few seconds of them firing from a real device. Standard GA4 reports (Acquisition, Engagement, Retention) update once per day and typically reflect the previous day's data. If you need to validate your integration quickly, always use DebugView during development rather than waiting for the standard reports to update.

Can I use the GA4 Data API to show analytics data inside my FlutterFlow app without a backend?

No — not safely. The GA4 Data API requires OAuth2 or a service-account credential for authentication. A service-account JSON key embedded in your compiled app binary can be extracted by anyone who downloads your app. The only safe approach is routing GA4 Data API calls through a Firebase Cloud Function that stores the credential server-side and returns only the metric values your app needs.

Why are my iOS analytics numbers lower than expected after integration?

iOS 14.5 and later requires apps to request App Tracking Transparency (ATT) permission before accessing the IDFA (Identifier for Advertisers). Without proper ATT consent, some analytics signals — particularly those tied to advertising attribution — are blocked. For basic event logging unrelated to ad measurement, this has minimal impact. However, if your GA4 property is linked to Google Ads for attribution, you may see lower iOS data due to ATT consent rates.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Integrations are where projects stall

We wire FlutterFlow integrations like this one every week — auth, webhooks, edge cases included. Fixed-price builds from $13K, delivered in 6–10 weeks.

Talk to an integration engineer

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.