Skip to main content
Question

Potential Duplicate in_app_purchase Events with Capacitor Firebase and RevenueCat Integration

  • October 4, 2024
  • 1 reply
  • 111 views

Forum|alt.badge.img+2
  • New Member
  • 1 reply

Hi everyone,

I’m in the process of migrating from the Cordova Purchase Plugin to RevenueCat and have a question about how Firebase Analytics handles in-app purchase events with the following setup:

Currently, with @capacitor-community/firebase-analytics installed, all in-app purchases are automatically logged in Firebase Analytics as in_app_purchase events, even though I haven’t explicitly configured this. I assume this happens because Firebase SDKs natively track purchases on iOS and Android platforms.

As I transition to RevenueCat, I’m considering whether or not to implement its Firebase integration. My concern is that this could cause the same in_app_purchase events to be logged twice: once by the native Firebase SDK and potentially again via RevenueCat's integration.

My main questions are:

  • Has anyone experienced this setup? Do I correctly assume that enabling the Firebase integration in RevenueCat could lead to duplicate logging of in_app_purchase events?
  • Are there any other advantages to implementing the Firebase integration in RevenueCat, even if the native Firebase SDK is already tracking these events?

Thanks in advance for any insights or advice!

This post has been closed for comments

1 reply

jeffrey_bunn
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 285 replies
  • October 8, 2024

Hi @Rgrg,

Since StoreKit2 was released on iOS, most analytics SDKs no longer track in-app purchases by default. We note this in our migration guide. As such, we generally recommend using our in-house integrations to send purchase information to other services (like Firebase). 

However, you can track StoreKit2 purchases with the Firebase SDK if desired; you just need to explicitly track the purchases. Please see Firebase’s documentation here.

One thing to keep in mind is if you’re using Firebase’s A/B testing product AND you want to set a purchase event as a “Goal”, this is only possible with Firebase SDK purchase tracking. They have not exposed an API that allows purchase events (sent through our integration) to be used within their A/B testing product. 

However, I would recommend that you A/B test using RevenueCat’s experiments instead, as you’ll have all purchase data available within the experiment results.

Thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings