capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.

Home Page:https://capawesome.io/plugins/firebase/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat(analytics): add logTransaction method

TomDoesb opened this issue · comments

Plugin(s)

  • Analytics
  • App
  • App Check
  • Authentication
  • Crashlytics
  • Cloud Firestore
  • Cloud Messaging
  • Cloud Storage
  • Performance
  • Remote Config

Version

6.0.0

Platform(s)

  • Android
  • iOS
  • Web

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

  • I have read and followed the bug report guidelines.
  • I have attached links to possibly related issues and discussions.
  • I understand that incomplete issues (e.g. without reproduction) are closed.
commented

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

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