CleverTap / clevertap-android-sdk

CleverTap Android SDK
MIT License
80 stars 74 forks source link

Android 12 impact regarding advertising id #200

Closed calvarez-ov closed 2 years ago

calvarez-ov commented 3 years ago

Google is introducing new policies regarding the google advertising id:

https://support.google.com/googleplay/android-developer/answer/6048248?hl=en

What are the impacts of google's new policy regarding opting out of tracking, in android 12, on the clevertap sdk, and apps which use clevertap?

Will we have to add the new permission to the app?

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

Or will CleverTap use the new App Set Id apis instead?

Additional information: I see the CleverTap sdk retrieves the google advertising id in DeviceInfo.java

darshanclevertap commented 3 years ago

@calvarez-ov The impact of Google's new policy regarding opting out of tracking depends on whether your app is GDPR compliant or not.

If your app is GDPR compliant, then the CleverTap Android SDK does not fetch the Google Ad ID for tracking the user even today. So no changes are required in your app.

If your app is using the Google Ad ID, for tracking a user in CleverTap (using the XML meta tag mentioned in Step 2 here), and if the user has opted out, there are two scenarios -

  1. In the current SDK version (v4.2.0) and below, if the user opts out of sharing Google Ad ID, then CleverTap servers will create a random CleverTap ID and pass it to the SDK. The user's profile on the CleverTap dashboard can be queried using this random ID.
  2. In the next CleverTap Android SDK version we will be checking for the string of zeroes when we fetch the Google Ad ID from Google's Advertising SDK and replacing it with a random ID. This will be used as the CleverTap ID on the dashboard.

So ideally, there is almost no change required from an app point of view when it comes to Google's Advertising ID-related changes.

I'm answering your questions below for more clarity -

Q1. Will we have to add the new permission to the app?

<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

A1. If you're using Google Mobile Ads SDK (play-services-ads), then this permission is already added by them. Now if your app is GDPR compliant, CleverTap will not be using this Google Ad ID to create the CleverTap ID. If your app uses Google Ad ID for tracking users, then this permission is already present in your app and you will not have to do anything. If your app is GDPR compliant and doesn't require the above permission, you can remove it by following the steps mentioned here.

Q2. Will CleverTap use the new App Set Id APIs instead?

A2. CleverTap will not be using the new App Set ID APIs for creating CleverTap IDs directly as of now, but the app can use them and pass the App Set ID using our Set CleverTap ID feature.

The next version of the SDK mentioned in point 2 above is a work in progress and I can provide an ETA for you along with #202 in the next few days.

I hope this clarifies everything. If you still have any questions or concerns, feel free to ask! 😇

calvarez-ov commented 3 years ago

Wow, many thanks for such a detailed and complete response! Really appreciated ❤️

darshanclevertap commented 2 years ago

In the next CleverTap Android SDK version we will be checking for the string of zeroes when we fetch the Google Ad ID from Google's Advertising SDK and replacing it with a random ID. This will be used as the CleverTap ID on the dashboard.

We have released the new version (4.3.0) of the CleverTap Android SDK today. This has been fixed in it.

Closing this now.