Google Analytics 4/Firebase Analytics uses the following keys/IDs to log events for Apple TV, Roku, CTV, and Web apps.
1. Firebase Measurement ID
2. GA4 Measurement ID
3. GA4 API Key
In this article, we will see how to link your Firebase and Google Analytics accounts to get the required Keys/IDs.
Step 1: Login to your Firebase Account here.
Step 2: Open the same project where you registered your iOS and Android apps.
Step 3: Click on "Add App" and add a new Web App.
Step 4: Give a name to your Web App. We recommend using your actual App name. Click on Register.
Step 5: In this step, the Firebase SDK with the relevant information will be displayed. Grab the measurementID from here. This is your app's Firebase Measurement ID. Save this ID. We will use this in the later steps. Now click on Continue to Console.
Step 6: From the Console, go to your Project Settings.
Step 7: In Project Settings, under the Integration tab, select Google Analytics.
Step 8 - a: If you already have a default GA account linked to your Firebase account, you will see the below screen.
Step 8 - b: If you do not have a GA account linked to your Firebase account, you will be asked to create a new GA account or to link a default GA account to your Firebase account. Please choose one option to link a GA account to your Firebase account.
Step 9: Once you have linked a GA account, you will see the below screen, click on the GA link to open the GA account.
Step 10: On the Google Analytics Dashboard, under Admin, click on Data Streams.
Step 11: Click on the Web app that is displayed on this page. (This is the same web app you registered on Firebase)
Step 12: Here you will find your app's GA Measurement ID. Save this ID. We will use this in the later steps.
Step 13: Scroll down on the current page and click on Measurement Protocol API Secret.
Step 14: Click on Create to create a new API Secret key. Enter a name for the key and click on Create again.
Step 15: Cope the Secret Value once the secret is created. This is your GA4 API key. Save this Key. We will use this in the later steps.
Step 16: Write to us at submissions@mazsystems.com and provide us with your GA4 Measurement ID, Firebase Measurement ID, and GA4 Secret Key. We will add these to your app code. App updates will be required to enable this feature in your app.
Congratulations! You have successfully linked your Firebase and GA account and enabled GA4 on your Apple TV, Roku, CTV, and WEB apps.
Was this article helpful?
Articles in this section
- GA4 Explorations
- Profile ID API Endpoint
- Introduction to GA4
- Enabling GA4 for your Apps
- Create a Firebase Account
- Register your iOS app on Firebase
- Register your Android Apps on Firebase
- Registering your Apple TV, Roku, CTV and Web App on Firebase
- How to Add Custom Definitions in your GA4 Property
- All app data tracked in Google Analytics 4