firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Firebase-analytics adds Ad dependecy

Open shumidub opened this issue 3 years ago • 25 comments

When I'm using com.google.firebase:firebase-analytics:18.0.2 package com.google.android.gms.ads.identifier.AdvertisingIdClient appears into my apk. And Play Console show warning "Ad SDK found"

изображение

I want to have a way to use firebase analytics without AD SDK.

Similar issue https://github.com/invertase/react-native-firebase/issues/3617

shumidub avatar Apr 12 '21 15:04 shumidub

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

google-oss-bot avatar Apr 12 '21 15:04 google-oss-bot

Hi @shumidub thanks for reaching out. Per this help center article: "By default, the Firebase SDK collects identifiers for mobile devices (for example, Android Advertising ID and Advertising Identifier for iOS) ..."

This is done to enable attribution, as well as reporting on demographics and interests. If you'd like to continue reporting Ad ID, Google Play now requires publishers that collect Ad ID to submit a privacy policy. Otherwise If the developer doesn't want to collect Ad ID, they can disable collection instead.

aguatno avatar Apr 13 '21 17:04 aguatno

But after add meta-data to Manifest Ads classes also is in apk изображение

And Google Play show warning изображение

shumidub avatar Apr 14 '21 12:04 shumidub

I have same error on Google Play (And I havn't this error month ago): Безымянный But in my project havn't AdMob, only Firebase: AndroidStudio

// Firebase
    implementation platform('com.google.firebase:firebase-bom:26.6.0')
    implementation 'com.google.firebase:firebase-core'
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-analytics'

mobile-sergey avatar Apr 16 '21 14:04 mobile-sergey

How I can delete AdMob SDK from App without deleting Firebase? Becouse I need to publish app without advertising.

mobile-sergey avatar Apr 16 '21 14:04 mobile-sergey

Thanks https://github.com/invertase/react-native-firebase/issues/3617. The problem with AdMob SDK is in com.google.android.gms:play-services-ads-identifier that is inside com.google.firebase:firebase-core and com.google.firebase:firebase-analytics

For fixing I change my dependencing like this:

    // Firebase
    implementation platform('com.google.firebase:firebase-bom:26.6.0')
    implementation ('com.google.firebase:firebase-core') {
        exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
    }
    implementation ('com.google.firebase:firebase-messaging') {
        exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
    }
    implementation ('com.google.firebase:firebase-crashlytics') {
        exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
    }
    implementation ('com.google.firebase:firebase-analytics') {
        exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
    }

And now my Firebase working and Google Play don't show warnings: GooglePlay

P.S: Sorry that Russian on screenshots. This is becouse I don't know how to change language in Google Play Console. But I hope that you understand main idea of screenshots.

mobile-sergey avatar Apr 19 '21 12:04 mobile-sergey

Unfortunately this error came again, and my fixing don't working :( May be it becouse Google AdMob test needs time to update information. AdMob

Perhaps this fix will help. I'll write about the results later.

configurations.all {
    exclude group: 'com.google.android.gms', module : 'play-services-ads'
    exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
    exclude group: 'com.google.android.gms', module : 'play-services-ads-lite'
}

dependencies {
// ...
    // Firebase
    implementation platform('com.google.firebase:firebase-bom:26.6.0')
    implementation 'com.google.firebase:firebase-messaging'
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-analytics'
// ...
}

mobile-sergey avatar May 05 '21 19:05 mobile-sergey

Unfortunatelly my fix not working :( Does anybody knows how to fix it?

mobile-sergey avatar May 12 '21 09:05 mobile-sergey

Analytics use: The advertising identifier may only be connected to personally-identifiable information or associated with any persistent device identifier (for example: SSAID, MAC address, IMEI, etc.) with the explicit consent of the user

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

shumidub avatar Aug 29 '21 08:08 shumidub

I want to disable collecting ads id from my application for my peace of mind

shumidub avatar Aug 29 '21 08:08 shumidub

And I want to remove com.google.android.gms:play-services-ads-identifier dependency from my app to hide "Ads warning" in the Play Console

shumidub avatar Aug 29 '21 08:08 shumidub

Hi all, Sorry for getting back late. To disable id collection, please follow our guide here and I've submitted a request to fix the Ads warning in Google Play. I'll keep you posted.

aguatno avatar Oct 21 '21 14:10 aguatno

Hi there,

I'm using ionic 3 with cordova-plugin-firebasex and got warning in play store.

I found that this can be solved by adding exclude module: "play-services-ads-identifier" to build.gradle.

But when I do ionic cordova build android, it overwrites the changes in build.gradle file.

So is there any way to remove the admob sdk (play-services-ads-identifier) from ionic 3 project?

KishanDasani avatar Oct 23 '21 08:10 KishanDasani

Hi all, Sorry for getting back late. To disable id collection, please follow our guide here and I've submitted a request to fix the Ads warning in Google Play. I'll keep you posted.

I add to AndroidManifest.xml: <meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

But after publish to GooglePlay I get "SDK AdMob" again. And this not fixed the problem.

mobile-sergey avatar Nov 05 '21 13:11 mobile-sergey

Analytics use: The advertising identifier may only be connected to personally-identifiable information or associated with any persistent device identifier (for example: SSAID, MAC address, IMEI, etc.) with the explicit consent of the user

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

Sorry, this page can't be found.

mobile-sergey avatar Nov 05 '21 13:11 mobile-sergey

Dear developers of Firebase. Can you connect to developers of GooglePlay? You have been working for the same company Google. Please fix this bug with developers of GooglePlay. May be this bug in GooglePlay?

mobile-sergey avatar Nov 05 '21 13:11 mobile-sergey

Hello. Are there any new developments for issue?

mericgerceker avatar Mar 22 '22 08:03 mericgerceker

You can just add to the AndroidManifest to remove the 'AD_ID' permission and then also tell the Firebase Analytics SDK not to collect it.

The documentation for the class included by the play-services-ads-identifier, explains how the AD ID is used and how to avoid any transitive dependencies from adding the permission.

https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#getId()

I can see part of this was already posted, but just included it for completeness and discoverability.

AndroidManifest.xml

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

<meta-data
            android:name="google_analytics_adid_collection_enabled"
            android:value="false" />

lordcodes avatar Apr 19 '22 12:04 lordcodes

Faced with same issue

image

Will firebase.json

{
  "react-native": {
    "google_analytics_adid_collection_enabled": false
  }
}

work instead of

<meta-data
    android:name="google_analytics_adid_collection_enabled"
    android:value="false" />

?

Of course with

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

Bardiamist avatar Jul 28 '22 11:07 Bardiamist

D

This not work with a android studio Firebase project, the permission is not on the merged manifest anymore, but google still showing the erro message

EverGreeff avatar Jul 28 '22 17:07 EverGreeff

Screen Shot 2022-07-27 at 1 32 59 PM

I just selected yes in the Play Console.

deepak786 avatar Jul 28 '22 17:07 deepak786

Screen Shot 2022-07-27 at 1 32 59 PM

I just selected yes in the Play Console.

you just selected yes and worked ?

M001T avatar Aug 08 '22 02:08 M001T

@M001T Yes.

deepak786 avatar Aug 08 '22 04:08 deepak786

I have Contacted to Google Play support they replied that if you use analytics, you need to choose YES on The AD_ID permission for analytics use case on Advertising ID section.

You should not remove permission manually or remove analytics sub-modules which contains AD_ID permission since it can break things...

So just need to choose YES even if the app is not using Ads All you have to do is: Go to Google play console App Content -> Advertising ID section -> Choose Yes and mark the Analytics option and check Turn off release errors check box

Ktc60 .

kunwar295 avatar Aug 08 '22 07:08 kunwar295

I have Contacted to Google Play support they replied that if you use analytics, you need to choose YES on The AD_ID permission for analytics use case on Advertising ID section.

You should not remove permission manually or remove analytics sub-modules which contains AD_ID permission since it can break things...

So just need to choose YES even if the app is not using Ads All you have to do is: Go to Google play console App Content -> Advertising ID section -> Choose Yes and mark the Analytics option and check Turn off release errors check box

Ktc60 .

Why would they need to ask if they force it anyway?

IMO App functionality, Analytics & Developer Communications should be seperated from "advertising ID"

FauziAmth avatar Sep 12 '22 09:09 FauziAmth

@aguatno please this is become urgent. Google Play now block apps from releasing

Screenshot from 2022-09-26 17-22-27

My app doesn't have ads. Just Firebase Analytics

Even doing all this the google play still complains:

in the manifest

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

inside application tag

<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

and dependency:

    implementation(platform("com.google.firebase:firebase-bom:30.4.1")
    implementation("com.google.firebase:firebase-analytics-ktx") {
        exclude(module = "play-services-ads-identifier")
    }

Nothing, the Google Play still complains with that error when trying to create a new release

danielesegato avatar Sep 26 '22 17:09 danielesegato

With apologies - I need everyone to understand that I/we are not in control of this here. The repo you want to chase down is firebase-android-sdk / possibly in concert with Play Store support. I am sorry that I can't be more help but this is not something we add here or control here.

I see you have posted there as well, so this is largely duplicate: https://github.com/firebase/firebase-android-sdk/issues/2582

I will only leave this open for information purposes / possible updates only, but that bug 2582 over on firebase-android-sdk is the one to follow. Then if they release a change we can adopt it here as needed

mikehardy avatar Sep 26 '22 18:09 mikehardy

Hi @danielesegato, could you try removing the code you've altered, and add the solution provided by kunwar295? If I'm not mistaken, there's no extra code setup needed. All that's needed is the declaration that an Advertising ID is being used in third party library (Firebase Analytics). This can be done through your Google Play Console, and that should be sufficient enough to remove the error.

I don't think there should be any more issue here since this should be working after proper declaration in Google Play Console. I'll close this issue for now. If this is still not working, let me know and I'll reopen the issue. Thanks!

argzdev avatar Sep 26 '22 19:09 argzdev

@danielesegato and others - for some reason adding <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" /> is what caused the permission to appear in my merged manifest. As soon as I removed this line, everything was fine.

Firebase services I use

My app includes no ads whatsoever. All I want is crashlytics, performance monitoring and analytics:

dependencies {
    implementation platform('com.google.firebase:firebase-bom:29.1.0')
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-crashlytics'
    implementation 'com.google.firebase:firebase-perf'
    implementation 'com.google.firebase:firebase-firestore'
}

Configuration that worked for me

With the configuration as below I was able to get rid of the warning in GooglePlay console: app/build.gradle

configurations.all {
    exclude group: 'com.google.android.gms', module : 'play-services-ads'
    exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
    exclude group: 'com.google.android.gms', module : 'play-services-ads-lite'
}

app/src/main/AndroidManifest.xml

    <meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
    <meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="false" />

Again, if you have the following line in your AndroidManifest, ⚠️try removing it.

<!-- remove this -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />

moertel avatar Sep 29 '22 07:09 moertel

image I'm seeing this even if I remove all app bundles in the release.

I want explicit documentation for requiring Ad ID usage declaration for analytics dependency. Is it play store bug or requirements? I can't know.

jeiea avatar Sep 29 '22 14:09 jeiea

Hi @jeiea, you could check out the documentation which contains the explanation for requiring Ad ID, under the section of Identifiers for mobile devices.

The Google Analytics for Firebase SDK automatically generates and assigns an app-instance identifier to each instance of your app. Analytics uses the ID to identify unique installations of your app and compute user metrics. Learn more about the app-instance ID.

By default, the SDK collects identifiers for mobile devices (for example, Android Advertising ID and Advertising Identifier for iOS) and uses technologies similar to cookies.

As for the issue, I assume this is a bug where even if you remove all your app bundle, the most recent app bundle is still retained (you would notice this when you try to upload the same app bundle again, an error would come out), but I could be wrong though. That said, I think it would be best to reach out to the Play Console help support. Alternatively, updating your declaration will remove the error.

argzdev avatar Sep 30 '22 10:09 argzdev