Last Updated: 2021-03-17
What is Google Analytics for Firebase?
Google Analytics is a free app measurement solution that provides insight on app usage and user engagement.
Analytics provides unlimited reporting on up to 500 distinct events.
30 of these 500 events can be marked as conversions, which are useful for running Google ad campaigns as you can create an ad campaign that optimizes towards these conversions.
Custom audiences can be defined in the Firebase console based on device data, custom events, or user properties. These audiences can be used with other Firebase features when targeting new features or notification messages.
What is Google Ads?
Google Ads (formerly Google AdWords and Google AdWords Express) is an online advertising solution that businesses use to promote their products and services on Google Search, YouTube, and other sites across the web. Google Ads also allows advertisers to choose specific goals for their ads, like driving phone calls or website visits. With a Google Ads account, advertisers can customize their budgets and targeting, and start or stop their ads at any time.
What you'll learn
- How to create a Firebase project for your app
- How to create conversions in your Firebase project
- How to create audiences in your Firebase project
- How to create a Google Ads account for your app
- How to link your Firebase project to your Google Ads account
- How to import conversions from Firebase to Google Ads
- How to import audiences from Firebase to Google Ads
What you'll need
- An App with the Firebase SDK installed
- A credit card (for Google Ads)
- Create a Firebase project: Before you can add Firebase to your app, you need to create a Firebase project to connect to that app. Visit Understand Firebase Projects to learn more about Firebase projects.
- Register your app with Firebase: To use Firebase in your Android app, you need to register your app with your Firebase project. Registering your app is often called "adding" your app to your project.
- Go to the Firebase console
- In the center of the project overview page, click Add app to launch the setup workflow
- Follow the instructions, which may differ depending on whether you are setting up an Android or iOS app, then click Register app
- Add a Firebase configuration file: Download the configuration file from the setup flow and install it per the instructions for Android or iOS
- Add Firebase SDKs to your app: Be sure to implement the Google Analytics for Firebase SDK, specifically. Separate instructions for Android and iOS are provided in the setup wizard. They are also available on the Firebase Developer Site
- Start logging events: The Google Analytics for Firebase SDK will automatically log some events for you. To add custom events, use the logEvent method.
- (Optional) You can enable verbose logging to monitor logging of events by the SDK to help verify that events are being logged properly. This includes both automatically and manually logged events.
- (Optional) Use DebugView to see the raw event data logged by your app on development devices in near real-time
- Enable debug mode
- Navigate to DebugView in the Firebase interface, located in the Analytics section of the left navigation
- Mark your most important events as conversions
- Navigate to the Events page
- Identify the events you want to set as conversions
- Toggle the "Mark as conversion" for those events
- *Once you link your Firebase project and Google Analytics with Google Ads, conversions will be made available to in Google Ads for import
- Navigate to Audiences, located under Analytics in the Firebase interface
- *Note: The same audience builder is also available in your linked Google Analytics 4 property. Click "View more in Google Analytics" and locate Audiences under the Configure menu item
- Choose one of three options for creating an audience:
- Create a new audience by defining all the parameters yourself.
- Use a template and modify the existing parameters.
- Select a suggested audience. You can use it as is, or modify it to suit your needs.
Note: At this point we are going to pause on using Firebase and switch to Google Ads. We'll come back in a bit to link the two accounts though.
- Go here to enter Google Ads https://ads.google.com/ and click on Start now
- Sign in to your existing Google Account, or create a new one.
- If you already have a Google Account (in other words, if you use any other Google product, such as Gmail), enter your Google email address and password, then click Sign in.
- If you don't have an existing Google Account, or want to use a different email address to sign in, just click Create an account at the bottom of the screen and follow the instructions to create and confirm your new Google account.
- If this Google Account already has an Ads account:
- You will see a list of your available accounts. You can select one if you wish and skip the remaining steps.
- Otherwise, click on New Google Ads Account
- For app campaigns, click on Switch to Expert Mode
- You will now be required to create your first app campaign
- Click on App Promotion
- Leave App installs selected
- Select either Android or iOS
- Type your app name to search for it - note that your app must be launched on the corresponding app store if you want to create an ACi campaign for it.
- Select your app
- Click Continue
- Select your campaign settings
- Give your campaign a name
- Select the locations you want to target
- Add the languages you want to target
- Enter your budget
- Leave Install Volume selected - note that GA4F is not needed for creating an ACi tCPI (or max conversions) Android campaign as it automatically imports the installs from Google Play. You can change this later to the first open from GA4F however.
- Leave All users selected
- Uncheck Set a target cost per install (optional)
- Click Save & Continue
- Create your Ad Group
- Give your ad group a name
- Add the text, images, videos, and HTML5s you wish to use as assets
- Click Save & Continue
- Confirm your payment info and hit Submit
Before you begin
To link a Firebase project to Google Ads, use a Google account that has the following permissions. If your account doesn't have these permissions, ask your Firebase or Google Ads administrator for help.
- In Firebase, your account needs to be an owner of the project that you want to link.
- In Google Ads, that same Google account needs administrative access.
Learn how to grant or remove access to your Google Ads account.
Link Google Ads accounts to Firebase
To link Google Ads accounts to a Firebase project:
- Sign in to Firebase.
- Click the Settings icon and select Project Settings.
- On the Project Settings page, click the Integrations tab.
- On the Google Ads card, click Link.
- If a Google Ads account is already linked and you want to add another account, click Manage.
- You must have administrative access to an Google Ads account in order to link. If you do not have administrative access to an existing account, you can click Upgrade & link to create a new one in Google Ads.
- [Optional] If an Google Ads account is already linked and you are adding another account, click Link account.
- Select the Google Ads accounts you want to link and click Link.
- (If you have already added all the Google Ads accounts that you administer, the Link account button is dimmed.)
- In your Google Ads account, click on Tools & Settings in the top right corner, and then click on Conversions
- In the conversion actions tab, click on the + sign
- Click on App, then select the Google Analytics 4 properties (Firebase) option. Finally, click on Continue.
- Lastly, select the checkbox next to the conversions you would like to import and then click on Import and Continue.
- In your Google Ads account, click on Tools & Settings in the top right corner, and then click on Audience Manager
[Optional] Creating a new audience in Google Ads
- Select the + sign in the blue circle at the top of the screen
- Click on App users
- Give your audience a name, and then select the app you wish to build this audience for
- Finally, add the actions (or combination of actions) you wish to build this audience from, select the pre-fill option, and then click on Create Audience.
Using an existing audience
- Select the checkbox next to the audiences you want to add, then click the dropdown arrow next to "Add to..." in the blue bar at the top of the screen, and then select either Ad groups or Campaigns.
- Select the checkbox next to the campaign (or ad group) you want to add the audience too, then click next
- Finally, select a targeting setting for that audience and then click next
Congratulations, you've successfully created conversions & audiences in Firebase and imported them into Google Ads!