Limit Ad Tracking and take control on your device

Over the last two decades, the market has shifted from confined physical locations or traditional storefronts to a more digital marketplace where goods and services are exchanged. This led to the introduction of digital marketing to promote and sell products and other services online. To promote digital products and services, advertisers use this digital channel to display advertisements for targeted consumers. These advertisers are mostly companies that use these advertisements to build their consumer group with a common interest.

In Android, such practices are not an exception and you may notice that on one webpage you search for a specific term and products and you open your favorite Android app that contains ads and you see the same products being advertised. You might ask yourself how is this possible, here is where ad tracking comes into the equation. To track the consumers on an Android device an advertising ID is used, also known as the Google Advertising ID (GAID) or Android Advertising ID (AAID) is a unique identifier provided by Google Play Services. Such Ads ID can be reset or even removed by the user.

For some consumers and Android users, this can feel like a violation of their privacy, and they want to temporarily or permanently disable such tracking activity. In this article, we will show you how to disable and re-enable the ad ID on your Android device.

Advertising ID in Android

In Android, this cannot be fully disabled, meaning removing ads entirely, but you can limit the tracking activity. Limiting ad tracking is important for several key reasons:

  • Having control over personal data: restricting the amount of personal data that advertisers can collect and use

  • Reduced data sharing with third parties: limiting the data sharing with data brokers
  • Limit online advertising tracking activities.
  • Fewer ads
  • App performance: limiting ad tracking improves performance and battery life due to the reduction of background data usage
  • Reduction in Malvertising
  • Protection against unwanted profiling

How to Limit Ad Tracking

In this section we will show you how to delete, reset and create advertising ID.

Delete advertising ID

  1. Go to Settings

  2.  Tap on Google settings

 3. Tap All Services and select Ads

 

4. Tap on Delete Advertising ID

5. Press the delete Advertising ID button

Reset advertising ID

Create new advertising ID

Detect limiting tracking programmatically

On the other hand, developers can also detect such limited ad tracking programmatically by importing the Play Services Ads Identifier dependency.

implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")

See the Play Service Ads Identifier maven repository for the latest releases. 

The getAdvertisingIdInfo is a suspend function that perform network operations and should not be done on the main thread to avoid blocking the UI. Since it is a suspend function it should be called from a coroutine or another suspending function.

CoroutineScope(Dispatchers.IO).launch {

        // implementation....

         val advertisingIDInfo = AdvertisingIdClient.getAdvertisingIdInfo(context)

         // implementation....
}

See the full example from our Github repository. 

Conclusion

Limiting ad tracking on Android (or any mobile device) is a significant step towards reclaiming user privacy, and improving user experience and security enhancements in the digital environment. Such practice puts the user in control of their data and advertising preferences.