Tracking IAP & Subscriptions in Firebase and BigQuery
Last updated
Last updated
Most app developers who use Firebase rely on the default Automatically Generated Events for in-app purchase and subscription reporting. Unfortunately, it’s not always very accurate and there are cases where revenue is misreported or doesn’t match. We attempt to demystify how Google reports on in-app revenue.
By default, the product ID, product name, currency, and quantity are passed as parameters in an automatically generated in_app_purchase
event. The revenue is reported is gross.
For Android apps, the Firebase account must be connected with Google Play.
Google documentation on the in_app_purchase
event:
For iOS apps, Firebase collects some events but doesn’t communicate or validate these purchases with the App Store– so events that are handled by the store will not be included. For IAP (Consumables) this generally is limited to trials or refunds. For subscriptions, this includes refunds and– critically– renewals. Therefore by default Firebase revenue may differ from values you see on the App Store.
When a user completes an in-app purchase, including an initial subscription, that is processed by the App Store on iTunes or by Google Play. Google Analytics supports automatic subscription tracking on Android and iOS.
This event is triggered only by versions of your app that include the Google Analytics for Firebase SDK. Note: paid-app purchase revenue and refunds (iOS only) are not automatically tracked.
Your reported revenue may differ from the values you see in the Google Play Developer Console. Events that are flagged as being invalid or as sandbox (test) are ignored. Only iOS events are flagged as sandbox. Learn more about testing Google Play billing.
An important note for those app developers who are exporting this data to make use elsewhere: when exported to BigQuery, the price remains in the local currency. This is why we convert purchases from local currency to USD using Open Exchange Rates for that day and report all data in GMT.
Earlier in the same document, for the app_store_subscription_renew
event, Google states:
When a paid subscription is renewed. This event is set as a default conversion. Requires an initial subscription that was made on or after July 1, 2019.
This event is not exported to BigQuery.
Ostensibly this suggests Firebase does track Google Play events — and makes this available in Google Analytics but doesn’t enable this data to be exported to Google BigQuery. There are three workarounds: use a third-party receipt validation service like RevenueCat, build your own validation service and share events using a custom webhook, or overload the in_app_purchase event with your own renewal event.
If you’d like to simply track aggregate IAP and Subscription spend earnings, you should pull directly from the store APIs. Which we do in our Revenue Dashboards.