capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
367 stars 90 forks source link

feat(analytics): add logTransaction method #629

Open TomDoesb opened 1 month ago

TomDoesb commented 1 month ago

Plugin(s)

Version

6.0.0

Platform(s)

Current behavior

Firebase documentation states the following on tracking in app purchases with storekit 2

image

However the logTransaction() is not available in capacitor-firebase and logging the event using FirebaseAnalytics.logEvent({name: 'in_app_purchase', params: {productIdentifier: productIdentifier}});

gives the following log message: 10.24.0 - [FirebaseAnalytics][I-ACS013006] Event name is reserved. Ignoring event: in_app_purchase

Expected behavior

I would expect to be able to log an iOS StoreKit 2 purchase. This is now not possible because google analytics expects the key_event name to be in_app_purchase which is reserved..

Reproduction

-

Steps to reproduce

-

Other information

Docs: https://firebase.google.com/docs/analytics/measure-in-app-purchases

Capacitor doctor

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.0.0 @capacitor/core: 6.0.0 @capacitor/android: 6.0.0 @capacitor/ios: 6.0.0

Installed Dependencies:

@capacitor/android: not installed @capacitor/cli: 6.0.0 @capacitor/ios: 6.0.0 @capacitor/core: 6.0.0

[success] iOS looking great! 👌

Before submitting

EinfachHans commented 4 days ago

@robingenz with storekit 1 officially being deprecated it would be awesome to somehow support the logging of storekit 2 purchases

robingenz commented 4 days ago

Yes, I'll have to have a look at it, but I have a few high prio todos at the moment. :/