Firebase SDK (firebase-analytics and firebase-config) is used for analytics and remote config for tests and settings.

Firebase integration steps

To connect your Firebase account , follow the steps:

Step 1: Import Firebase

Firebase SDK is already included in Appodeal SDK (firebase-analytics and firebase-config). You don't need to install it separately.

Step 2: Configure Firebase app

You may follow this guide to configure your Firebase app.

1. Add classpath qualifier to buildscript → dependencies into your app level build.gradle file.

buildscript {
	dependencies {
    	// ... other project dependencies         
		classpath 'com.google.gms:google-services:4.3.10'
	}
}

2. Connect Google Services plugin to your module 

plugins {
    // ... other project dependencies         
    id 'com.google.gms.google-services'
}

3. Add your google-services.json file into the module (app-level) directory of your app from Firebase console.

Step 3: Add your Web API key in Attribution Settings

  1. Go to Firebase Console and enable Firebase Authentication by selecting your project → Build→ Authentication and press Get Started(Web API Key is available now)


  2. Go to your Project Settings and copy your Web API Key
  3. Go to your app settings in your Appodeal account and choose Attribution Settings.
  4. In Firebase Settings add your Web API Key in Firebase Config Keys field from Firebase and enable Firebase Tracking.

Step 4: Contact us

Contact our support team via live chat or via email  support@appodeal.com to complete integration.

Demo application

You can use our demo analytics app  as a reference project.

Event tracking

Appodeal SDK allows you to send events to analytic services such as Firebase, AppsFlyer, Adjust and Meta using a single method:

// Create map of event parameters if required
Map<String, Object> params = new HashMap<>();
params.put("example_param_1", "Param1 value");
params.put("example_param_2", 123);

Appodeal.logEvent("appodeal_sdk_test_event", params);

Please note:

Event parameters can only be strings and numbers.