Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [firebase_analytics] Measuring in-app purchases manually required by StoreKit 2 #8077

Open
ninjz opened this issue Oct 22, 2024 · 13 comments
Labels

Comments

@ninjz
Copy link

ninjz commented Oct 22, 2024

Apparently when supporting StoreKit 2 on iOS, in-app purchases cannot be measured automatically by the analytics SDK anymore. https://firebase.google.com/docs/analytics/measure-in-app-purchases#implementation

I can't seem to find a method for manually tracking IAP events. Are there plans on supporting manually logging this or is this already supported somewhere?

@ninjz ninjz added Needs Attention type: enhancement Implements a new Feature labels Oct 22, 2024
@mikehardy
Copy link
Collaborator

Apologies, I do not know - this might be something to ask directly on stackoverflow tagging it appropriately (firebase team offers support there) or through your normal firebase support channels as opposed to this repo

Whatever they suggest is what we could aim for here

@ninjz
Copy link
Author

ninjz commented Oct 22, 2024

I think it’s quite relevant as a feature request to this repo seeing as this would require additional method calls to the native SDKs to support this.

There are already calls to log non IAP purchases. This would be an extension as auto-logging of IAP events will not work with the deprecation of StoreKit 1.

I believe this would be required by anyone interacting Purchase SDKs and need to send IAP purchase events back to Firebase analytics when StoreKit 2 becomes mandatory.

@mikehardy
Copy link
Collaborator

Totally agreed, the problem is I'm unsure what the native method calls are in the SDK and/or how firebase-js-sdk (our reference API) does it - do you have a link to their documentation and APIs / types for this perhaps

If not:

This might be something to ask directly on stackoverflow tagging it appropriately (firebase team offers support there) or through your normal firebase support channels as opposed to this repo

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 21, 2024
@LectricAvenue
Copy link

@ninjz curious if you made any headway with this. I am about to start looking into this for a solution myself and figured I would check in here first.

@github-actions github-actions bot removed the Stale label Dec 3, 2024
Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 31, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
@gbesler
Copy link

gbesler commented Jan 16, 2025

Any solutions on this? It has been over a year! Firebase is not reporting in app purchases with Storekit 2.

@mikehardy
Copy link
Collaborator

@gbesler - nope, looks like the free work fairy hasn't shown up yet ;-). I left some ideas that would move this forward, and apparently it isn't important enough for anyone to invest time in yet. If it is important to you please let me know what the results are of investigating for relevant APIs in the firebase upstream SDKs and/or stackoverflow

@gbesler
Copy link

gbesler commented Jan 16, 2025

Oh no :( Well, we use RevenueCat, and it is important to us to report native in app purchase events. But since RevenueCat does not provide Transactions we cannot use the way Firebase recommends for StoreKit 2. Firebase told they will deliver this in 2024 Q4, still nothing.

Do you have any idea how to solve this myself?

@mikehardy
Copy link
Collaborator

@gbesler with apologies no, I don't have any ideas. I see you participated (briefly! they closed the issue...) upstream in firebase-ios-sdk - that along with contacting Firebase Support appears to be the avenue based on upstream conversation. We can't really do anything until they fix it, then...I assume we would just update the firebase-ios-sdk version here and it would Just Work

@mikehardy
Copy link
Collaborator

Oh wait look at this! firebase-ios-sdk 11.7.0 has some mention of it in release notes:
https://firebase.google.com/support/release-notes/ios#analytics

You might like to try result of this PR once merged + released

@mikehardy mikehardy reopened this Jan 16, 2025
@github-actions github-actions bot removed the Stale label Jan 16, 2025
@gbesler
Copy link

gbesler commented Jan 16, 2025

Oh wow. I guess they released it. We will try it ASAP. Many thanks @mikehardy
I hope it just works.

@mikehardy
Copy link
Collaborator

mikehardy commented Jan 16, 2025

@gbesler I've got some problem with the iOS 18.2 SDK not being installed on our CI runner even though Xcode 16.2 is selected 🤷 so I'm not able to merge immediately and I can't say how long it will take.

However, if you're not aware, you can quickly override the firebase-ios-sdk version in your Podfile for local integration to see how it goes - just remember to remove the override later if you use it: https://rnfirebase.io/#ios

If you're using Expo I'm not aware of a way to override like that unfortunately (other than perhaps patch-package - in @react-native-firebase/app/package.json they are defined, or I suppose you could hack on the @react-native-firebase/app/RNFBApp.podspec as well to generate a patch-package patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants