Search code examples
androidcordovafirebasecordova-pluginsphonegap-plugins

Is it possible to use Firebase Cloud Messaging Android notifications without the analytics part?


I am using phonegap-plugin-push in a cordova app to manage push notifications. I got a google-services.json file containing all the informations needed to receive push notifications and it works well.

My problem is that a Google Firebase Analytics tracker is packaged in my app even if I don't want to use this analytics thing. I tried to remove the services part of the google-services.json file :

{
    "project_info": {
        "project_number": "xxxxxxxxxxxxx",
        "firebase_url": "https://abc.firebaseio.com",
        "project_id": "abc",
        "storage_bucket": "abc.appspot.com"
    },
    "client": [
        {
            "client_info": {
                "mobilesdk_app_id": "x:xxxxxxxxxxxx:android:xxxxxxxxxxxxxxxx",
                "android_client_info": {
                    "package_name": "..."
                }
            },
            "oauth_client": [
                {
                    "client_id": "...",
                    "client_type": 3
                }
            ],
            "api_key": [
                {
                    "current_key": "..."
                }
            ],
            "services": {
                "analytics_service": {
                    "status": 1
                },
                "appinvite_service": {
                    "status": 1,
                    "other_platform_oauth_client": []
                },
                "ads_service": {
                    "status": 2
                }
            }
        }
    ],
    "configuration_version": "1"
}

I hoped that removing these services from my configuration file would disable them, but I rebuilt my app and the tracker is still here.

I didn't find any documentation on the status key for each services. I tried to set them to 0, but it didn't change anything.

That's why I'm wondering if it is even possible to use Firebase Cloud Messaging to get notifications on Android device, but without using Firebase Analytics. I don't want to track my users to get some analytics, just provide them some push notifications.


Solution

  • No you can't make them off.

    By default firebase integrate some common firebase analytics with your app that you can see in firebase analytics console. By you don't want to track furhter custom analytics it's up to you.

    Hope you get it.