How to configure Ionic 3 Firebase Analytics - firebase

I have been searching around on google and the Ionic docs site and am confused on something. I see there is two seperate plugins. Firebase and FirebaseAnalytics. It seems like Ionic 3 doesn't really support the FirebaseAnalytics plugin since it's not on Ionic 3 docs site and when I tried to install it I got all kinds of dependency errors and when I tried to fix them it casued even more issues. Can someone who knows about this explain to my what I would be missing if I just used the Ionic 3 Firebase plugin and not newer exact FireBaseAnalytics plugin?

Make sure you are looking at the v3 documentation here.
As mentioned in the docs, you need to install these two things to your project:
$ ionic cordova plugin add cordova-plugin-firebase-analytics
$ npm install --save #ionic-native/firebase-analytics#4
Notice how the ionic-native firebase analytics module is specifically version 4. This is what makes it compatible with v3. Go through the instructions in those v3 documents and you should be good.

Related

Emulator is showing error {firebase.App() not found} while using firebase authentication with React Native using expo-cli

While using functionality of authentication through firebase, emulator is showing error i.e.{ you attempted to use a firebase module that is not installed on your android project by calling firebase.app() }.Please help me to resolve this error.
I'm using Expo as command line input.
react-native version -0.63.6,
"#react-native-firebase/app": "^8.4.3",
"#react-native-firebase/auth": "^9.2.3"
If you are using expo client, you should not use react-native-firebase modules because they are not compatible with expo client.
However, you can use firebase javascript SDK instead. It is all explained there.
Update 02-12-2021
Guys expo's eas-build is now public. You can add custom native codes and use react-native-firebase. Here is the link to a youtube tutorial. The video is short and super easy to follow. Here is the link to the docs
Previous answer
Currently, Firebase does not work in react native if you are using the mobile configuration. However, if you use the web configuration it will work. Here is the youtube tutorial. Watch from 38:20 to set up.

ionic 4 - SQLitePorter plugin is not installed

I followed this tutorial: https://devdactic.com/ionic-4-sqlite-queries/
I have a problem with the sqlitePorter plugin when I run this command on Visual Studio Code :
ionic serve --devapp
The application starts correctly on my mobile, but the following error suddenly appears in my console:
console.warn: Install the SQLitePorter plugin: ‘ionic cordova plugin add uk.co.workingedge.cordova.plugin.sqliteporter’
console.error: [plugin_not_installed error]
I do not really understand what happens because when I do “ionic cordova plugin ls”, the plugin is present.
Does anyone have an idea of ​​what might be going on, and how can I fix that?
Thank you in advance
Ionic DevApp only supports a selective set of native plugins of which this plugin is not one of them.
If you wish to use this plugin, you need to do a full native build app using Ionic/Cordova.
For More Info: https://github.com/dpa99c/cordova-sqlite-porter/issues/42

What's difference between Ionic native Firebase vs Firebase-Analytics?

What's difference between:
https://ionicframework.com/docs/native/firebase/
and
https://ionicframework.com/docs/native/firebase-analytics/
I already use "firebase" for push notifications, but I need register pageviews manually, I need use these two plugins?
Ionic 'Native' Firebase and Ionic 'Native' Firebase Analytics are the Ionic wrappers that are "providing a common interface for all plugins and ensuring that native events trigger change detection in Angular". These wrappers can't work without the plugin.
On the other side we have the Cordova Plugins as you can see in the Ionic documentation for installing a plugin.
$ ionic cordova plugin add cordova-plugin-firebase (1)
$ npm install --save #ionic-native/firebase (2)
(1) - The Firebase Cordova Plugin that includes push notifications, event tracking, crash reporting, analytics and more.
(2) - The wrapper that offers you a 'gentle' interface to work with
So you can get everything you need with the Firebase plugin with OR without the Ionic Firebase wrapper.

Google Tag Manager for iOS - Carthage

After taking a look to Google Tag Manager for iOS, it seems the only way to integrate it is by using CocoaPods.
https://developers.google.com/tag-manager/ios/v5
My company use Carthage, though. Would it be possible to use Carthage instead? Did any of you manage to do it?
Seems like installing it with CocoaPods is the only way to integrate it.
If you want other way, You can create a demo app and install Google Tag Manager in it using CocoaPods and then copy the framework file into your project. It worked for me.

Issue integrating analytics plugin in Mobile First Application project

I have a problem...
I'm try to add this plugin: https://github.com/danwilson/google-analytics-plugin.
I'm develop an application with: AngularJS, Ionic and Mobile First Platform 7.1(MFP), in this version of MFP I must add the plugin manually.
iOS works fine.
My problem is Android:
Error: "The import com.google.android cannot be resolved".
I download Google Play Services with SDK but the problem continues...
Any idea to solve this problem?
Regards.
This other plugin https://github.com/appfeel/analytics-google uses gradle dependencies which should solve this problem.
Other option could be to remove google play dependency from the plugin you mentioned and manually modify gradle (actually I don't recommend this option as gradle gets generated automatically each time you remove/add the platform).
Other option is to modify the plugin itself (maybe a github fork). Here you can see what should it be modified: https://github.com/appfeel/analytics-google/pull/11/files

Resources