arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1.01k stars 1.55k forks source link

Not reporting In-App Purchases on Android #147

Open DavidFrahm opened 7 years ago

DavidFrahm commented 7 years ago

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 commented 7 years ago

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?

Venkat-TTapp commented 7 years ago

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

devtobo commented 7 years ago

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

DavidFrahm commented 7 years ago

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.

devtobo commented 7 years ago

@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.

jayseb11 commented 6 years ago

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?

patricksebastien commented 6 years ago

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

robertarnesson commented 6 years ago

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

ColDrekken commented 6 years ago

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

Best regards

svzi commented 6 years ago

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.

ibnclaudius commented 6 years ago

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

mikemike396 commented 5 years ago

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

andrey3diq commented 5 years ago

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

mikemike396 commented 5 years ago

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

andrey3diq commented 5 years ago

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

ncuong-wg commented 4 years ago

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 ?