Is Google Analytics available without "ejecting" the React Native app - firebase

Recently, Google has sent a message claiming "the older style of Google Analytics for mobile apps[, Google Analytics for mobile apps reporting,] and the Google Analytics Services SDK ... will begin to sunset ..." It goes on to suggest that Google will replace the old UA-based tracking with a Firebase version.
I use React Native and the app is not ejected, yet. The team doesn't want to eject the app. Is there any package or procedure in place that will allow the app to report view opens/navigations to Google Analytics without ejecting the app?

Related

Integration of Branch.io with Google Firebase in React Native

I need to Integrate Branch.io with Google Firebase Account for one of my mobile apps built in react native so I can be able to Track all my deep links data on Google Firebase or Google Analytics Dashboard. but the issue is the official branch.io documentation only shows the implementation for the native apps (like in Java, Kotlin, or Swift) and not for the React Native apps. I am also attaching the reference link from the branch.io official documentation to provide a better view of what exactly I want.
https://help.branch.io/using-branch/page/firebase

How to accept Firebase Properties Google Analytics updated Terms of Service of hosting only project (no apps)?

I have more than a dozen Firebase projects, some of them are hosting-only (without any attached apps), a few of them has apps too (usually any mobile app I have has a companion website and sometimes the app can even interact with its website). Each website has Google Analytics property created and associated with (not via Firebase, but via Google Analytics).
Firebase started to warn us to accept updated Google Analytics Terms of Service. Today it's a final notice:
This is the final reminder that you own one or more Firebase projects using Google Analytics that have not accepted the updated Terms of Service. Accepting the Terms is required to continue using Google Analytics.
I could accept the updated ToS for those few projects where Firebase hosted website has a companion app as well. But any other website which is hosting only does not offer that.
I don't have any companion app (no iOS app, no Android app, no webapp, no Unity app) for those so how would I overcome that and get to the ToS accept dialog so I can select my GA property and get this over with?
If the terms are still not accepted by March 15th, 2022, we will permanently delete these properties and their data.
(I guess they mean the GA properties here. I don't want that.)
My situation may be different but I could accept conditions following these instructions:
you should be able to look at the Analytics integration settings by opening Settings (gear icon in navigation, "Project settings"), opening the "Integrations" tab, and opening the "Google Analytics" integration card.

How to handle analytics on PWA when it is deployed both as an web app and an TWA in Play Store

How should I integrate analytics into a PWA webapp ? if I add analytics from google analytics into webapp and publish it in a server, then later, if I want to publish it on Google Play Store, how should I track the use?
here's the scenario:
I'm deploying the PWA from a subdomain.
then I'm publishing the PWA from Google Play Store as a TWA.
My concerns:
Should I use the google analytics snippet for web to track the subdomain-based pwa and firebase analytics for my Google Play Store app?
Or,
Can I use a single method to track both versions at the same time?
I have found this faq of chrome developer about use of google analytics
The CPA library follows the basic usage pattern of Google Analytics and will feel familiar to existing users of Google Analytics. However, unlike the web-centric official Google Analytics JavaScript libraries, the CPA library uses an "app-centric" model that is better suited for Packaged Apps. Among other features, the library provides methods for specific types of hits, such as "event" and "appView", and it can be used in both Closure-based and traditional JavaScript projects.
I am using Vuejs as frontend with pwa template, not sure if it is applicable for my use case. Any suggestion or direction would be much appreciated.
I am using THIS - Web + App configuration.
Using this you can track both at the same time.
You can configure it easily in firebase - see HERE for more

How can we use Firebase Analytics with an expo based react-native app

I am trying to add Firebase Analytics (FA) to my react-native app.
Actually, I didn't find a problem to put Google Analytics (GA) using this library expo-analytics.
But apparently Firebase analytics is more powerful and it is really built for mobile apps. That is why I wanted to use it in my application but the problem is that :
I am using Expo and I cannot detach my app to add the json config files.
So my question is: is there a way to have Firebase Analytics with Expo and react-native without detach?
The default binding that Expo has for Firebase is based on the Firebase JavaScript SDK. This means that it is limited to the Firebase products that are available to web developers, which (since September 2019) includes Google Analytics for Firebase (the new name for Firebase Analytics).
Have a look at the Firebase documentation to learn how to get started with analytics on the web.
Previous, and now outdates, answer below. I'm leaving it here for reference for how.
The default binding that Expo has for Firebase is based on the Firebase JavaScript SDK. This means that it is limited to the Firebase products that are available to web developers, which unfortunately doesn't include Google Analytics for Firebase (the new name for Firebase Analytics).
This means that you'll have to rely on a third party library for binding other Firebase features into your Expo app. And since those libraries are bridging to the native Android and iOS SDKs of Firebase, there is no way to use them without detaching/ejecting.
Also see:
this discussion on expo.canny.io where an Expo team member weighed in
another discussion on expo.canny.io
Invertase's bindings from React Native to Firebase
Intertase's blog post on using Cloud Firestore from React Native
Check out a detailed answer of how to integrate Firebase Analytics into Expo here:
https://github.com/firebase/firebase-js-sdk/issues/2244#issuecomment-558621111
In short:
You can integrate Firebase Analytics into Android App using android.googleServicesFile field. Works at least for SDKs 33, 34, 35.
For iOS App ios.googleServicesFile field is missing in the Expo Docs but still can be used for Firebase Analytics. Works at least for SDK 34. Issue in Expo repo was created: https://github.com/expo/expo/issues/6379

Google anlytics or Firebase analytics for web/native platforms?

Our app was hybrid app and we also have a website.
So we just used 'web' google analytics so far.
Now we are converting some pages to react native.
I see there are several options available for unified (web/native) reporting.
I'd like to use 'web' google analytics with react native if I could, but not sure if I could do that.
use screenview or pageview hit-type from both web and native, although I'm not sure If one could send pageview hit-type from native (or react-native)
connect firebase to GA (https://support.google.com/analytics/answer/2587086) not sure what it actually does.
use bigquery (https://cloud.google.com/solutions/mobile/mobile-firebase-analytics-big-query) although I don't want to go this route because it's seems too much work to set up..
How do you organize analytics when you have both web and app ?

Resources