-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
🔥 [🐛] Event Attribution Discrepancy between Firebase and Google Ads in React Native Firebase SDK #8108
Comments
🤔 Hmm, going to be quite the run-around on this one unfortunately, since we're comparing two cloud-based + different google services (google ads, firebase analytics) and it's wrapped by this library which both of them are suspicious of since they don't control it. Here's what I know based on your helpful information - those two events are marked as reserved for us - that is no user may use an analytics API here which attempts to manually log them: react-native-firebase/packages/analytics/lib/index.js Lines 55 to 58 in 88d3362
react-native-firebase/packages/analytics/lib/index.js Lines 85 to 99 in 88d3362
So, we do not even let users log those events, full stop. Nothing in this library allows for those events to be used, they are off-limits. In a full-repo search, the My informed hypothesis is that this library is not involved in sending that conversion information to google servers at all. To explore this a bit more - looking more widely for the words convert or conversion do not yield anything analytics related either: https://github.com/search?q=repo%3Ainvertase%2Freact-native-firebase+convert+language%3AJava&type=code&l=Java Looking upstream, these are classed as "automatically collected events", and they have had problems before: firebase/firebase-android-sdk#2179 Indeed these are marked as automatically collected: That is, the SDKs under us - firebase-android-sdk in this case - are doing it for us with no part of this repository doing anything So I don't think this is a problem here However, this tidbit is interesting:
The more (and more technical) information we could get about that, the more it would help determine what this means, and whether we could influence it. Unfortunately I'm not even sure what it means at a technical level at the moment Possible ways forward: Of the 2 - 1 is of interest here but I don't think will actually resolve your issue. I think 2 is the real way forward This may be the best skeleton to begin with: then just hack in (the most rapid way possible) buttons that subscribe and cancel ? |
Thank you for your response and the insights provided. We’ve reached out to Google Analytics and Firebase support for further clarification on the attribution issues. They are currently reviewing the setup but haven’t identified a conclusive reason for the event discrepancy. We have one additional question regarding user consent for analytics and ad tracking. Currently, we are not requesting explicit user consent for analytics data collection. Could the absence of consent handling be a potential cause of these unattributed pings? If consent could be impacting event attribution, we’re considering implementing the following code after obtaining user consent: import { firebase } from '@react-native-firebase/analytics';
// ...
await firebase.analytics().setConsent({
analytics_storage: true,
ad_storage: true,
ad_user_data: true,
ad_personalization: true,
}); Would you recommend this approach, or is there additional guidance on handling consent to improve data attribution? Any advice on this front would be greatly appreciated. Thank you again for your assistance! |
With sincere apologies - as soon as the conversation tracks into user consent flows I have to bow out - this is a specific area that requires correct answers for legal reasons and not only am I not an expert I haven't done more than implement the react-native APIs (that is: I have not actually used them) so I don't even have the experience, must less the actual required expertise. I don't want to lead anyone astray. That said, if you look at the setConsent code where we make the javascript bindings you'll see that this one is also just a pure / boring wrapper - there's nothing to the react-native layer. That means two things, it shouldn't be "us" (react-native-firebase) with an error if there is one, but also if you attempted a native reproduction directly with a quickstart from firebase-android-sdk, it should be trivial as the APIs are also trivial The javascript - some validation, then a native call: react-native-firebase/packages/analytics/lib/index.js Lines 215 to 233 in 88d3362
The native call - mostly just type conversion from what comes in from javascript to native types, then the firebase-android-sdk call: Lines 117 to 139 in 88d3362
Not much to it? It could work, it may work, but I can't say either way, sorry |
Issue
Description:
Hello React Native Firebase team,
We’re experiencing a significant data discrepancy between Firebase and Google Ads for specific conversion events in our app, built with the React Native Firebase SDK. We have thoroughly reviewed our integration, followed the documentation meticulously, and ensured our events are set up correctly. Despite this, only about 30% of our conversion events are reflected in Google Ads reporting compared to Firebase.
Event Details:
The specific events affected are:
in_app_purchase
All our traffic originates from Google Ads, so we expect near-perfect alignment between Firebase and Google Ads data. However, approximately 70% of our events appear unattributed.
Background from Google Analytics and Firebase Support:
We have reached out to both Google Analytics and Firebase Support, who have reviewed our setup and provided the following insights:
Google Analytics Feedback:
According to Google Analytics, many pings are "unattributed" in Firebase, suggesting potential issues with SDK implementation. They recommended consulting the Firebase support team or React Native Firebase community due to limited expertise with React Native SDKs.
Firebase Support Feedback:
Firebase Support confirmed our Google Ads and Firebase are correctly linked, and our events show a "google" source, indicating they should be attributed to Google Ads. They noted that React Native Firebase is not an official Firebase SDK, so issues could stem from its external nature. They suggested exploring attribution nuances or consulting Google Analytics further for historical data and configuration details.
Request:
Could you provide any guidance or insights into what might cause these unattributed pings in the React Native Firebase SDK? Is there anything specific to this SDK that could result in this significant data drop-off or the unattribution issue?
We appreciate any assistance or advice on resolving this discrepancy. Thank you for your support and for providing a fantastic tool for integrating Firebase with React Native!
Additional Context:
We have confirmed that our setup aligns with all provided documentation, and we haven't omitted any configuration steps.
At the moment most of our users are on Android, we are not able to confirm if the issue is also on iOS
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:# N/A
iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:android/app/build.gradle
:android/settings.gradle
:MainApplication.kt
:AndroidManifest.xml
:Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:21.3.0
Firebase
module(s) you're using that has the issue:analytics
TypeScript
?N
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: