How to Install Google ADK

Cody Schneider••8 min read

If you have a mobile app, you collect data. But turning that data into something useful - like understanding user behavior or measuring marketing impact - requires the right tools. The best way to get that rich app data into a platform you already know is by installing the Google Analytics SDK. This guide will walk you through how to set up the SDK for your iOS or Android app so you can start making data-backed decisions.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Exactly Is the Google Analytics SDK?

An "SDK" (Software Development Kit) is a collection of tools, code libraries, and documentation that developers use to build features for a specific platform. Think of it as a specialized toolkit. Instead of building a connection from scratch, a developer can use the SDK as building blocks.

The Google Analytics SDK for Firebase is the specific toolkit that creates a bridge between your mobile app and your Google Analytics 4 property. Once installed, it automatically starts collecting important user activity and lets you track custom events that matter to your business.

Why do you need it? This connection allows you to:

  • Track User Engagement: See how many active users you have, which screens they visit the most, and how much time they spend in the app.
  • Analyze User Behavior: Understand the actions users take, such as completing a tutorial, making a purchase, or finishing a level in a game.
  • Measure Marketing Campaigns: Connect your app usage back to the ad campaigns that drove the installs, helping you calculate your true return on ad spend (ROAS).
  • Segment Your Audience: Create audiences based on in-app behavior - for example, users who have purchased before versus users who have dropped off during onboarding - and use them for ad targeting.

In short, without the SDK, your app is a data black box. With it, you get a clear view of what’s working and what isn’t.

Before You Start: A Quick Prerequisite Checklist

Getting this set up involves a few moving parts. While this guide breaks it down step-by-step, it's a task best handled by a developer or someone comfortable navigating app development environments like Xcode or Android Studio. Here’s what you or your developer will need:

  • Your App’s Source Code: Access to the project in either Xcode (for iOS) or Android Studio (for Android).
  • A Google Analytics 4 Account: If you don't have one, create one first. You'll need an existing GA4 property to send your app data to.
  • A Firebase Project: Firebase is Google's mobile and web application development platform. Google Analytics is deeply integrated with it. You’ll need a Firebase project to act as the middleman. We'll cover how to create one below.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step 1: Create a Firebase Project and Link Analytics

First, you need a central hub for your app in Google's ecosystem. This is your Firebase project. If you already have one, you can skip to the next step.

  1. Navigate to the Firebase Console and log in with your Google account.
  2. Click the Add project button.
  3. Give your project a descriptive name, like "[Your App Name] Analytics".
  4. On the next screen, you'll be prompted to set up Google Analytics for your project. Make sure this is enabled.
  5. Choose your existing Google Analytics account and the specific GA4 property you want to connect your app to. If you don't have one, Firebase can create one for you during this step.
  6. Click Create project and wait a few moments for it to finish.

Once your project is ready, you'll be taken to its main dashboard. This is your command center for managing your app's connection to Google services.

Step 2: Register Your App with Firebase

Now that your Firebase project exists, you need to tell it about your specific app so it can generate the right configuration files.

In your Firebase project dashboard, you’ll see icons prompting you to "Add an app to get started." You'll need to complete this process for each platform (iOS and Android).

For an iOS App:

  1. Click the iOS icon (Apple logo).
  2. You'll be asked for your iOS bundle ID. This is a unique identifier for your app. Your developer can find this in Xcode by selecting the main project target, then looking under General > Identity > Bundle Identifier.
  3. You can also add an App Nickname and App Store ID, but the bundle ID is the only required field.
  4. Click Register app.

For an Android App:

  1. Click the Android icon (robot logo).
  2. Here you need the Android package name. This is the unique identifier for your Android app, and it's found in your app project's build.gradle file, usually labeled as applicationId.
  3. As with iOS, you can add an App Nickname, but it's optional.
  4. Click Register app.

Step 3: Add the Firebase Configuration File to Your App

After registering, Firebase generates a configuration file. This small file contains all the necessary keys and identifiers to securely link your app build with your Firebase project. Getting this file in the right place is essential.

For iOS:

Firebase will prompt you to download a file named GoogleService-Info.plist. Download it, and then in Xcode, drag this file directly into the root directory of your app project. Make sure to check the "Copy items if needed" option when prompted.

For Android:

You’ll download a file named google-services.json. You need to move this file into the root of your app module's directory, which is usually YourProjectName/app.

Don't skip this file placement - if it’s in the wrong folder, the SDK won't be able to connect to Firebase.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 4: Install the Google Analytics SDK in Your Project

With the config file in place, the next step is adding the actual SDK code to your app's project. The process differs slightly for iOS and Android.

For iOS (Using Swift Package Manager):

The easiest way to manage packages in modern iOS development is with the Swift Package Manager, built right into Xcode.

  1. In Xcode, with your project open, navigate to File > Add Packages....
  2. In the search bar in the top right, paste the SDK repository URL: https://github.com/firebase/firebase-ios-sdk.git
  3. Xcode will fetch the repository. Once it's loaded, make sure "Up to Next Major Version" is selected for the "Dependency Rule."
  4. Click Add Package.
  5. A list of available package products will appear. All you need for basic tracking is FirebaseAnalytics. Select it and click Add Package again.

Finally, you need to add the initialization code. Open your AppDelegate.swift file. Add the import statement at the top, and then the configuration line within the application(_:didFinishLaunchingWithOptions:) method.

import Firebase

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  
  var window: UIWindow?
  
  func application(_ application: UIApplication,
                   didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    FirebaseApp.configure()
    return true
  }
}

That's it for iOS! The SDK is now part of your project.

For Android (Using Gradle):

Android development uses a build tool called Gradle to manage dependencies like the Firebase SDK. You'll need to edit two build.gradle files.

  1. Project-level build.gradle file: This is the one in your project's root directory. Make sure you have Google's Maven repository listed and add the dependency for the Google services plugin. It should look like this:
plugins {
  // ...
  id 'com.google.gms.google-services' version '4.3.15' apply false
}
  1. App-level build.gradle file: This file is located in the app module directory. Add the plugin at the top and the dependency for the Firebase Bill of Materials (BOM). The BOM manages the versions of all Firebase libraries so they are compatible with each other.
plugins {
  id 'com.android.application'
  // Add the following line:
  id 'com.google.gms.google-services'
}

dependencies {
  // ...
  // Import the Firebase BoM
  implementation platform('com.google.firebase:firebase-bom:32.3.1')

  // Add the dependency for the Google Analytics library
  implementation 'com.google.firebase:firebase-analytics-ktx'
}

Once you’ve added these lines, Android Studio will prompt you to "Sync Now." Click it to download and integrate the SDK into your project.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step 5: Verify Everything is Working

After you’ve completed these steps, build and run your app on a test device or an emulator. But how do you know it's actually working?

The best tool for this is the DebugView report in Google Analytics.

  1. Enable DebugView: You first have to tell your app to send events in a debug mode.
  2. Check Google Analytics: Go back to your Google Analytics 4 property. In the left-hand navigation, click on Admin, then in the Data stream section, click on DebugView.
  3. Run Your App: Now, run the app from Xcode or Android Studio with the debug settings enabled. Within seconds, you should see events appear in the DebugView report in real time. You'll see things like screen_view and first_open.

If you see events flowing in, congratulations! Your installation was successful. You've now a live data stream from your app directly into Google Analytics.

Final Thoughts

Setting up the Google Analytics SDK is the foundational step to understanding your mobile app's performance. By connecting Firebase, registering your app, installing the codebase, and verifying the connection, you unlock the ability to see exactly what your users are doing and which marketing efforts are paying off.

Getting app data into GA4 is an amazing first step, but modern marketing funnels are almost never that simple. Typically, the full picture includes campaign data from Facebook Ads, transactions from Shopify, and lead information from Salesforce. At Graphed, we remove the friction of jumping between all those platforms. We connect directly to your data sources and allow you to ask questions in plain English - like "create a dashboard showing ROAS by campaign, combining Facebook ad spend with in-app purchases" - and get a complete, real-time dashboard built for you in seconds.

Related Articles