AdGyde Logo

Uninstall Tracking

AdGyde's Uninstall Tracking functionality allows you to track the number of uninstalls for a specified application. Uninstalls is an important index which helps you to track the quality of users and hence the campaign.

1. Requirements
An Android application with AdGyde SDK integrated. Also, Firebase Project's Server Key for the same application

  1. Uninstalls tracking is supported from Android SDK version 3.1.0
  2. If you are using multiple InstanceIDListener services, you can create your own Listener and pass the token to AdGyde's API

2. Steps to Enable AdGyde's Uninstall Tracking

2.1. Application Without Firebase Messaging
If your android application is not using Firebase Messaging Service, then follow below instructions:

  1. Get your Firebase project's Server Key (Section 3)
  2. Enter the Server Key to your AdGyde's dashboard. (Section 4)
  3. Configure Firebase Messaging on your app. (Section 5)
  4. Add the following code to your application as described:
  5. Add the Firebase Dependency to your app's build.gradle file, as the following:

    dependencies {
    // . . .
    implement ''
    // . . .

  6. Add these lines to your app's AndroidManifest.xml file, inside the application tag:

    <!-- ... -->
    <service android:name="" exported="false" >
    <action android:name=""/>
    <!-- ... -->

2.2. Application with Firebase Messaging Integrated
If you have Firebase Notifications integrated into your app, then follow these instructions:
  1. Obtain your Firebase project's Server Key. (Section 3)
  2. Enter the Server Key to your AdGyde dashboard. (Section 4)
  3. Add the following code to your application as described:
  4. In your InstanceIDListener Service's onTokenRefresh method (a class extending, call our API inside the overridden method onTokenRefresh, as in the following example:

public class FIIDService extends FirebaseMessagingService {
private static final String TAG = "FIIDService";
public void onNewToken(String token) {
try {
String refreshedToken = token;
if (!TextUtils.isEmpty(refreshedToken)){
Log.d(TAG, "onTokenRefresh Refreshed token : " + refreshedToken);
} catch(Exception e){

3. Obtaining the Firebase Server Key
  1. Open the Firebase Console:
  2. Create a Firebase Android Application project (if you have not already done so). For more information, visit this link:
  3. After the project is created, open the project page by selecting the project from all the listed projects
  4. Navigate to the Project Settings (click on the cogwheel next to Overview on the left pane of the page)
  5. Under the Cloud Messaging tab, you can see your Sender ID which you may be using for FCM / GCM) and two Server Keys as shown below

  6. Make Note of Server Key (The Long Key and not the Legacy Server Key), which will be input in AdGyde's dashboard for uninstall tracking

4. Entering the Server Key on AdGyde's Dashboard
  1. Login to AdGyde Dashboard
  2. Go to Setup Page from side left navigation menu
  3. Select Uninstall Setup Link from the Uninstall Setup option on Setup Page
  4. Click on "Add Application FCM" option on Top Right corner

  5. Input the Firebase Server Key, which you had copied / noted in previous section in the area provided

5. Configure Firebase-Messaging on your Application
Follow the below steps as listed, or alternatively visit the firebase integration link by Google

  1. Download your project's JSON file: google-services.json and save it under your application's module directory. If you do not have this file, you can download it from your Project Settings in the Firebase Console
  2. Add the Firebase-Messaging dependencies to your project. Add rules to your root-level build.gradle file to include the google-services plugin:

    buildscript {
    // ...
    dependencies {
    // ...
    classpath ''

  3. In module Gradle file (usually the app/build.gradle) of the project and add also the dependency inside the dependencies block

    apply plugin: ''
    android {
    // ...

    dependencies {
    // ...
    compile ''

    In case "Could not find.." error is encountered, make sure you have the latest Google Repository in the Android SDK Manager to resolve the same

6. Using ProGaurd with Uninstall Tracking
If your project is using ProGaurd, you need to take care that AdGyde SDK functions and Google Firebase Messaging Service functions do not get obfuscated, for same following rule exceptions need to be added in ProGaurd file**
-keep public class {
public *;

7. Testing Android Uninstall Tracking
Testing of uninstall tracking is quite simple.
Whether the android application is live on Google Play or pending submission or even if out of store, the test will remain the same - just uninstall the app from the device.

It takes up to 24 hours for the new app’s uninstall event to be displayed on the uninstall trends section of the Dashboard.

This website uses cookies in order to improve your experience and our services. By continuing to use our website, agree to the use of such cookies. Click here for Privacy Policy.