Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase-analytics adds Ad dependecy #2582

Closed
shumidub opened this issue Apr 12, 2021 · 35 comments
Closed

Firebase-analytics adds Ad dependecy #2582

shumidub opened this issue Apr 12, 2021 · 35 comments

Comments

@shumidub
Copy link

shumidub commented Apr 12, 2021

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 invertase/react-native-firebase#3617

@google-oss-bot
Copy link
Contributor

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

@aguatno
Copy link

aguatno commented Apr 13, 2021

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.

@shumidub
Copy link
Author

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

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

@mobile-sergey
Copy link

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
Copy link

mobile-sergey commented Apr 16, 2021

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

@mobile-sergey
Copy link

mobile-sergey commented Apr 19, 2021

Thanks invertase/react-native-firebase#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.

@aguatno aguatno added the type: question Further information is requested label Apr 22, 2021
@mobile-sergey
Copy link

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

@shumidub
Copy link
Author

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
Copy link
Author

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

@shumidub
Copy link
Author

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

@aguatno
Copy link

aguatno commented Oct 21, 2021

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 aguatno added internal-bug-filed and removed needs-attention type: question Further information is requested labels Oct 21, 2021
@KishanDasani
Copy link

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?

@mobile-sergey
Copy link

mobile-sergey commented Nov 5, 2021

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
Copy link

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
Copy link

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?

@mericgerceker
Copy link

Hello. Are there any new developments for issue?

@lordcodes
Copy link

lordcodes commented Apr 19, 2022

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" />

@Bardiamist
Copy link

Bardiamist commented Jul 28, 2022

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" />

@EverGreeff
Copy link

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

@deepak786
Copy link

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

I just selected yes in the Play Console.

@M001T
Copy link

M001T commented Aug 8, 2022

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

I just selected yes in the Play Console.

you just selected yes and worked ?

@deepak786
Copy link

@M001T Yes.

@kunwar295
Copy link

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
.

@FauziAmth
Copy link

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"

@danielesegato
Copy link

@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

@mikehardy
Copy link

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: #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

@argzdev
Copy link
Contributor

argzdev commented Sep 26, 2022

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!

@moertel
Copy link

moertel commented Sep 29, 2022

@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" />

@jeiea
Copy link

jeiea commented Sep 29, 2022

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.

@argzdev
Copy link
Contributor

argzdev commented Sep 30, 2022

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.

@mobile-sergey
Copy link

Repeat my words:

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?

@argzdev
Copy link
Contributor

argzdev commented Oct 3, 2022

Hi @mobilase, we can probably raise this up to our engineering team and see if it's possible to talk to some GooglePlay folks if the issue still persists to our developers. It looks like a lot of our developers have been able to resolve the issue with the given solution.

From what I see, this is no longer a bug but more of a requirement on Google Play Console. That said, updating your declaration should already remove the error. I don't see any reason why this shouldn't work.

Are you still experiencing the issue you've previously mentioned? Have you tried the solution provided by kunwar295 and moertel?

@mobile-sergey
Copy link

Solution of kunwar295 is not for me. Because I need to control that Advertising ID not used in my app.

Solution of moertel interested and I test it when I get back to development of Android app with Firebase.
But I test similar solution and this is not working (see my next comment)

@argzdev
Copy link
Contributor

argzdev commented Oct 3, 2022

Got it, let me know if moertel's solution works.

@danielesegato
Copy link

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 I as you suggested: I declared my app uses AD ID for analytics by third party.

I was afraid this would make my app show as "Contain Ads" or something like that but it didn't. I still find it a bit odd that something about "AD" is needed for analytics but I'm OK with this.

It is not straight forward tho' and I think you should definitely get in touch with your Google Play colleagues to improve a bit the communication around this, at least in the Google Play side :)

Thanks for your time!

@firebase firebase locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests