Firebase
Firebase SDK (firebase-analytics and firebase-config) is used for analytics and remote config for tests and settings.
Firebase Connection
To connect your Firebase account, follow the steps below.
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
- UPM
- Manual
- Follow this guide to configure your Firebase app.
- For Android:
Add yourgoogle-services.xml
file from the Firebase console to the Assets folder of your project.
For iOS:
Add yourGoogleService-Info.plist
file from the Firebase console to the Assets folder of your project. - Go to Appodeal → Appodeal Settings → Firebase Settings and tick Enable auto Configuration for Firebase.
- Follow this guide to configure your Firebase app.
- Follow the steps below:
For Android
-
Create an empty folder with name values in the following path Assets/Plugins/Android/appodeal.androidlib/res/.
-
Use the online tool to generate
google-services.xml
file and add it to Assets/Plugins/Android/appodeal.androidlib/res/values/ folder.Or you can create an empty
google-services.xml
file and paste the content below (don't forget to replace the bold data with yours fromgoogle-services.json
file for unity app):
<?xml version="1.0" encoding="utf-8"?>
<resources tools:keep="@string/firebase_database_url,@string/gcm_defaultSenderId,@string/google_storage_bucket,
@string/project_id,@string/google_api_key,@string/google_crash_reporting_api_key,@string/google_app_id,@string/default_web_client_id" xmlns:tools="http://schemas.android.com/tools">
<string name="firebase_database_url" translatable="false">
</string>
<string name="gcm_defaultSenderId" translatable="false">Your_project_number_from_google-services.json</string>
<string name="google_storage_bucket" translatable="false">Your_storage_bucket_from_google-services.json</string>
<string name="project_id" translatable="false">Your_project_id_from_google-services.json</string>
<string name="google_api_key" translatable="false">Your_current_key_from_google-services.json</string>
<string name="google_crash_reporting_api_key" translatable="false">Your_current_key_from_google-services.json</string>
<string name="google_app_id" translatable="false">Your_mobilesdk_app_id(for unity app)_from_google-services.json</string>
<string name="default_web_client_id" translatable="false">Your_client_id_from_google-services.json</string>
</resources>
Step 3. Set Up Firebase Remote Config In Attribution Settings (Optional)
If you want to use Firebase Remote Config in your app, you can add your Firebase parameter keys from Firebase console → Project name → Remote Config to Firebase Config Keys in Attribution Settings.
Step 4. Enable Firebase Tracking In Attribution Settings
To enable sending events to Firebase SDK, you need to enable Firebase Tracking in Attribution Settings.
Demo Application
You can use our demo app as a reference project.
Demo App
Track In-app Purchases
Tracks in-app purchase information and sends info to Appodeal servers for analytics. It allows users to group by the fact of purchasing in-apps. This will help you adjust the ads for such users or turn them off if needed. In order to track in-app purchases, please refer to this guide
Event Tracking
Appodeal SDK allows you to send events to analytic services such as:
In order to setup event tracking please refer to this guide.