cordova-plugin-firebase icon indicating copy to clipboard operation
cordova-plugin-firebase copied to clipboard

Not reporting In-App Purchases on Android

Open DavidFrahm opened this issue 8 years ago • 16 comments

Thank you for this plugin. We use it for our Ionic 1 app, and it has been perfect with one exception.

We do not see In-App Purchases (aka IAP's) being reported to Firebase Analytics. We do see IAP's and their revenue reported to iOS from this same Ionic app.

In the weeks since we first started using this plugin, I've tried several things to get IAP's reporting on Android, with no luck.

Please advise if anyone has successfully reported IAP's on Android when using this plugin. I don't want to waste time with Firebase engineering if the issue is just here in the plugin.

DavidFrahm avatar Jan 18 '17 05:01 DavidFrahm

I thought it relevant to add that I've reported the issue to Firebase, and they have asked the following:

Are you by any chance using this line in your AndroidManifest.xml:

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

If so, please remove that line from the manifest and rebuild and redeploy the app, or add a call to FirebaseAnalytics.setAnalyticsCollectionEnabled(true) to the app and rebuild and redeploy the app. See https://firebase.google.com/support/guides/disable-analytics#temporarily_disable_collection_1

I don't see that element in our project's AndroidManifest.xml, so I don't think that's an issue.

As for the other call to FirebaseAnalytics.setAnalyticsCollectionEnabled(true) I looked at this plugin's source code and didn't see that. Any thoughts there?

DavidFrahm avatar Jan 18 '17 05:01 DavidFrahm

Hi DavidFrahm,

I know this is a very late reply. But I would like to confirm that there is no issue with this plugin to track IAP, as i have seen IAP tracking in firebase for both Android & iOS during our test and live IAP purchases done by my app users.

Regards, Venkat

Venkat-TTapp avatar Apr 20 '17 04:04 Venkat-TTapp

We do have the same problem, iOS in-app are reporting but not on Android. @DavidFrahm did you find a solution?

devtobo avatar Jun 05 '17 17:06 devtobo

Not a lot of info, but Firebase has told us this is a defective on their end. Once they fix it, this Android data should just work like it does on iOS.

Not sure why it's taking so long to get it fixed though. Firebase engineers seem unable to keep up with all the support that comes naturally from launching so many new features all the time.

DavidFrahm avatar Jun 05 '17 18:06 DavidFrahm

@DavidFrahm Thank you. Looks like this plugin is detecting in-app purchase:

06-05 14:44:14.544 I/FA-SVC  (26591): Tag Manager is not found and thus will not be used
06-05 14:44:14.594 D/FA-SVC  (26591): Logging event (FE): in_app_purchase(_iap), Bundle[{quantity=1, firebase_event_origin(_o)=auto, price=0, value=0, currency=JPY, product_name=, product_id=myinappproductsku}]
06-05 14:44:14.595 V/FA-SVC  (26591): Using measurement service
06-05 14:44:14.596 V/FA-SVC  (26591): Connecting to remote service
06-05 14:44:14.603 D/FA-SVC  (26591): Connected to remote service
06-05 14:44:14.620 V/FA-SVC  (26591): Processing queued up service tasks: 1
06-05 14:44:14.667 V/FA-SVC  (26591): Logging event: origin=auto,name=in_app_purchase(_iap),params=Bundle[{quantity=1, firebase_event_origin(_o)=auto, price=0, value=0, currency=JPY, product_name=, product_id=myinappproductsku}]
06-05 14:44:14.850 V/FA-SVC  (26591): Saving event, name, data size: in_app_purchase(_iap), 150
06-05 14:44:14.893 V/FA-SVC  (26591): Event recorded: Event{appId='com.mycie.myapp', name='in_app_purchase(_iap)', params=Bundle[{quantity=1, firebase_event_origin(_o)=auto, price=0, value=0, currency=JPY, product_name=, product_id=myinappproductsku}]}
06-05 14:44:14.899 V/FA-SVC  (26591): Upload scheduled in approximately ms: 3314779
06-05 14:44:14.929 V/FA-SVC  (26591): Scheduling upload with AlarmManager
06-05 14:44:14.936 V/FA-SVC  (26591): Background event processing time, ms: 270
06-05 14:44:15.470 D/FA      (26562): Connected to remote service
06-05 14:44:15.480 V/FA      (26562): Processing queued up service tasks: 1
06-05 14:44:19.624 V/FA-SVC  (26591): Inactivity, disconnecting from the service
06-05 14:44:21.397 V/FA      (26562): Inactivity, disconnecting from the service

But still no Analytics - Events - in_app_purchase on Android.

devtobo avatar Jun 05 '17 18:06 devtobo

This still seems to be a problem. I am experiencing it on Android but iOS in_app_purchase works just fine. Is there a workaround yet?

jayseb11 avatar Jan 16 '18 01:01 jayseb11

@robertarnesson Do you have an idea on how to fix this? We might work on it if you give some clues.

patricksebastien avatar Mar 07 '18 19:03 patricksebastien

@patricksebastien @jayseb11 As far as I know this is still on the Firebase team to fix.

robertarnesson avatar Mar 07 '18 21:03 robertarnesson

Hi, are there any news on this? Or workaround? I just updated to plugins last version but this problem seems still exist.

Best regards

ColDrekken avatar Sep 07 '18 14:09 ColDrekken

Any update on this? I'm also not seeing any IAP on Android in Firebase, but they exists in the Google Play Developer Console. And yes, both projects are linked.

svzi avatar Sep 11 '18 11:09 svzi

I can confirm the same problem, the event in_app_purchase for Android is not showing on Firebase dashboard.

ibnclaudius avatar Sep 14 '18 01:09 ibnclaudius

Any update? We are not seeing Android IAP's in firebase. iOS comes through perfect.

mikemike396 avatar Mar 20 '19 18:03 mikemike396

It's not working for me too. It's a shame that Firebase doesn't fix it for so long.

andrey3diq avatar Apr 01 '19 08:04 andrey3diq

Any update? We are not seeing Android IAP's in firebase. iOS comes through perfect.

We got it working! You have to have the "Owner" of the Play Store account added to the Firebase project as an "Owner" also. Then on the "Owner" account in Firebase go to project settings and then integrations. It should let you link it there.

Any other type of permission such as admins of Google Play Console or developer permission on Firebase didn't work. Had to be Owner on both platforms. The one sucky thing is Play Store only allows 1 owner per application. Hope this helps.

Screen Shot 2019-04-04 at 10 52 36 AM

mikemike396 avatar Apr 04 '19 14:04 mikemike396

@mikemike396 awesome! It's working now, thanks a lot!

andrey3diq avatar Apr 06 '19 06:04 andrey3diq

Any update? We are not seeing Android IAP's in firebase. iOS comes through perfect.

We got it working! You have to have the "Owner" of the Play Store account added to the Firebase project as an "Owner" also. Then on the "Owner" account in Firebase go to project settings and then integrations. It should let you link it there.

Any other type of permission such as admins of Google Play Console or developer permission on Firebase didn't work. Had to be Owner on both platforms. The one sucky thing is Play Store only allows 1 owner per application. Hope this helps.

Screen Shot 2019-04-04 at 10 52 36 AM

The app has been published ( release production mode on Play Console) before we link Firebase to Play Console and Admob, do we need to update the google services json file on app then build it and release the new app version on store ?

ncuong-wg avatar Feb 17 '20 16:02 ncuong-wg