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 iOS application with AdGyde SDK integrated. Also, Firebase Project's Server Key for the same application

2. Steps to Enable AdGyde's Uninstall Tracking

2.1. Application Without Firebase Messaging
If your iOS 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. import Firebase
    import Adgyde_SDK

    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Override point for customization after application launch.
    return true
    }

    func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
    Adgyde.update(firebase: fcmToken)
    }
    }


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:

    import Firebase
    import Adgyde_SDK

    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    Messaging.messaging().delegate = self
    FirebaseApp.configure()

    UNUserNotificationCenter.current().delegate = self
    UNUserNotificationCenter.current().requestAuthorization(options: [.badge, .sound, .alert], completionHandler: {
    granted, error in
    DispatchQueue.main.async {
    if granted {
    UIApplication.shared.registerForRemoteNotifications()
    }
    }
    })

    return true
    }

    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    let deviceTokenString = deviceToken.reduce("", {$0 + String(format: "%02X", $1)})

    Messaging.messaging().apnsToken = deviceToken
    if let token = Messaging.messaging().fcmToken {
    Adgyde.update(firebase: token)
    }
    }
    }

3. Obtaining the Firebase Server Key
Create a Firebase IOS Application project (if you have not already done so) or migrate your project from Google Developer Console (follow the instructions there). For more information, visit this link:
https://firebase.google.com/docs/cloud-messaging
  1. Open the Firebase Console: https://console.firebase.google.com
  2. Create a Firebase iOS Application project (if you have not already done so). For more information, visit this link: https://firebase.google.com/docs/cloud-messaging/ios/client
  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
https://firebase.google.com/docs/cloud-messaging/ios/client

  1. Download your project's plist file: GoogleService-Info.plist and save it under your application's root directory of xcode project. If you do not have this file, you can download it from your Project Settings in the Firebase Console
  2. In case "Could not find.." error is encountered, make sure you have the latest Google Repository in the iOS SDK Manager to resolve the same.

6. Testing iOS Uninstall Tracking
Testing of uninstall tracking is quite simple.
Whether the iOS application is live on App Store 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.