Skip to main content
Question

RevenueCat → Firebase Analytics: avoiding duplicate purchase revenue with StoreKit 2 and Google Play Billing

  • Nov 30, 2026 11:24 PM UTC
  • 1 reply
  • 8 views

Forum|alt.badge.img

Hi,

I use RevenueCat in observer mode with native StoreKit 2 and Google Play Billing purchases.

Firebase currently tracks in-app actions and custom user properties (subscription_plan, subscription_offer). These properties are refreshed during app use, so they can become outdated while the app is closed.

Would you recommend keeping Firebase focused on in-app behavior, or enabling RevenueCat’s Firebase integration to include subscription lifecycle events? With the integration, an expiration event could arrive while the user property still indicates an active subscription. How would you handle that?

Separately, I currently call Analytics.logTransaction on iOS, and Google Play is not linked to Firebase/Google Analytics on Android.

If I remove the iOS call and leave Google Play unlinked, would enabling RevenueCat’s integration give me a single source of purchase revenue, or could Firebase still automatically log overlapping purchases?

Thanks!

1 reply

Short version: yes, if you drop the iOS Analytics.logTransaction call and keep Google Play unlinked, RevenueCat's Firebase integration can be your single source of purchase revenue. A few details make it work cleanly:

1. Where the overlap would come from

  • RevenueCat sends lifecycle events to GA4 through the Measurement Protocol. Initial purchases, renewals (including trial conversions) and non-subscription purchases arrive as purchase with revenue; the rest are rc_* events (rc_trial_start, rc_cancellation, rc_expiration, rc_billing_issue, rc_product_change, and so on).
  • The Firebase SDK's own IAP tracking logs in_app_purchase. On iOS it does that automatically only for StoreKit 1; for StoreKit 2 it only logs when you call Analytics.logTransaction. On Android it comes from linking Google Play to Firebase/GA.
  • GA4 revenue totals count both event types, so as long as either of those paths is active you'll see the same sale twice. Remove logTransaction and keep Play unlinked, and the purchase events from RevenueCat are the only revenue events left.
  • Check it with one sandbox purchase per platform in DebugView/Realtime. You should see RevenueCat's purchase and no in_app_purchase. RevenueCat sends sandbox events too, so use a test stream or filter them out of your reports.

2. Make sure the events attach to the right user
Set the $firebaseAppInstanceId attribute (Purchases.shared.attribution.setFirebaseAppInstanceID(Analytics.appInstanceID()) on iOS, the equivalent on Android) on every launch. If it's missing or wrong, the events never show up or land on the wrong instance. If you use Firebase Auth, also logIn to RevenueCat with the Firebase UID.

3. Stale user properties vs. server-side lifecycle events
I'd keep both, but give each one job:

  • Events from RevenueCat are the source of truth for lifecycle and revenue. They're server-side, so they fire even when the app is closed (an expiration usually arrives within minutes when store server notifications are set up).
  • User properties are a "state at last session" snapshot for segmenting in-app behavior. Refresh them from CustomerInfo on launch and in the customer info update listener rather than only at purchase time, so they correct themselves the next time the user opens the app.
  • For questions like "how many subscribers expired", build audiences or explorations from the rc_expiration / rc_cancellation events, not the property. A user with subscription_plan = annual plus an rc_expiration after their last session is simply a lapsed subscriber who hasn't reopened the app, and that's often a useful segment in itself.
  • If you want the property to read correctly without an app open, the only fully server-side option is to update your own backend from RevenueCat webhooks (and call GET /subscribers for current state) and compute segments there.

One limitation to know: Google doesn't let Measurement Protocol events drive Firebase A/B Testing, so RevenueCat's events (including purchase) can't be used as A/B test goals. If you need revenue as an A/B goal, that's the one case where you'd keep a client-side event, and you'd give it a different name so it isn't counted as revenue twice.