evollu / react-native-firebase-analytics Goto Github PK
View Code? Open in Web Editor NEWReact native bridge for firebase analytics
License: MIT License
React native bridge for firebase analytics
License: MIT License
Hi,
Thanks for your effort. I look to using this plugin. A glitch though, whilst getting the app to build via xcode:
Undefined symbols for architecture
with "_OBJC_CLASS_$_FIRApp"
Here is the solution:
http://stackoverflow.com/questions/37344676/undefined-symbols-for-architecture-armv7-objc-class-firapp
Cheers,
Alex
Each time I try to call setScreenName
I get the following warning:
<FIRAnalytics/WARNING> setScreenName:screenClass: must be called after a view controller has appeared
To get the warning you have to first set FirebaseAutomaticScreenReportingEnabled
to NO
in the Info.plist
.
Afaict no screen event is sent when the warning appears.
Thank you for sharing your work.
I followed #20
Where should I look for this type of error?
/Users/edward3/Documents/projects/react-native/field-planner-mobile/android/app/src/main/java/com/ditchwitch/fieldplanner/MainApplication.java:25: error: package com.evollu.react.fa does not exist
import com.evollu.react.fa.FIRAnalyticsPackage;
^
/Users/edward3/Documents/projects/react-native/field-planner-mobile/android/app/src/main/java/com/ditchwitch/fieldplanner/MainApplication.java:39: error: cannot find symbol
new FIRAnalyticsPackage(),
^
symbol: class FIRAnalyticsPackage
2 errors
:app:compileDebugJavaWithJavac FAILED
I appended to settings.gradle
include ':react-native-firebase-analytics'
project(':react-native-firebase-analytics').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-analytics/android')
I'm doing like
Analytics.logEvent('view_item', {
'item_id': 'Login'
})
However If I put a custon event like
Analytics.logEvent('ADD_NAME', {
'name': 'John'
})
If I see the audiences and select the custom audience I can't see the property name on the list. Any tip with this?
It would be great if there was a way to only enable this module in production builds. Whether the best course of action is to include something in the module, or provide an example of how to go about it in the documentation, I don't know.
Hello,
Can you please help me with the issue described at the following URL?
[]https://stackoverflow.com/questions/46814065/firebase-analytics-add-to-cart-event-not-showing-infos-about-item-name-paramete
Althought I send the item_name attribute I cannot find it in the firebase console (no chart displayed). The add_to_wishlist event shows the item_name propertie instead.
I got the following response from FirebaseSupport
[email protected]
Hi there,
Thanks you for your patience.
It seems that you are using a third-party react native plugin. Currently, Firebase does not have official support for React Native. We can't guarantee that these third-party plugins will function properly with Firebase, nor do we provide troubleshooting support for any issue encountered. Support for React Native is a popular feature request though and our team is currently looking into potential solutions for this, but we don't have a definite timeline on when this will be available.
I would suggest that you report your issue in their GitHub repository.
Regards,
Aki
Also, can you please inform me when the event_demographics will register gender and age? Our application is currently in testing, not published in any store, but documentations state that those infos will be registered automatically (did not wrote any code for demographics). Althought we registered events since 2 monts ago, the firebase console doe not show any demographics.
Thanks,
Alex.
Hello,
Thank you for this module.
I have successfully setup on the iOS, but I keep on getting this error while compiling for android.
Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/MessengerCompat$1;
using react-native-firbase-analytics 1.0.6
using react-native 0.32.0
import React, {
Component,
PropTypes,
} from 'react';
import {
View,
StyleSheet,
ScrollView,
Alert,
AlertIOS,
InteractionManager,
} from 'react-native';
import Analytics from 'react-native-firebase-analytics';
import Dialog from 'react-native-dialog';
// ...
export default class CartPage extends Component {
constructor(props) {
super(props);
this.state = {
renderPlaceholderOnly: false,
};
props.dispatch(fetchCartInfo(props.serviceType));
props.dispatch(fetchMyCouponCount());
}
componentWillMount() {
console.log(Analytics.setEnabled);
Analytics.setEnabled(false);
}
I trying run this Component. occurring error undefined is not an object (evaluating 'FIRAnalytics.setEnabled)
but console is that.
02-04 19:52:28.531 2896 2959 I ReactNativeJS: [Function: setEnabled]
02-04 19:52:29.127 2896 2959 E ReactNativeJS: undefined is not an object (evaluating 'FIRAnalytics.setEnabled')
Naturally, I included google-service.json file as well. and already run rnpm link
what the hell?
I think NativeModules.RNFIRAnalytics
is undefined.
What should I check?
Hello guys. I have a problem with build after installation pod file.
warning
ld: warning: directory not found for option '-L/Users/serzn1/Library/Developer/Xcode/DerivedData/Counter-edtbdpnhstjryegnyhppxrhswrgb/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac'
error
ld: library not found for -lGoogleToolboxForMac
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to resolve this problem?
So I just recently updated my react native version to 0.48.4. On one of the many iterations of rebuilding my environment after react-native-git-update destroyed all of it, I found this error:
Default FirebaseApp is not initialized in this process com.kinvitereact. Make sure to call FirebaseApp.initializeApp(Context) first.
This was a new error that I hadn't seen in previous Android builds with react-native-firebase-analytics or react-native-fcm.
Is this something that can be handled in the library? If so, then I could do a PR. If not, then could the steps to get through this be documented somewhere?
Hi is possible to install this package and Firebase Crash Report?
When I'm using this in dev, i'd love some logging toggle to know that i'm at least getting my messages to the library. I suggest something like setEnabled
. The default would be not to log, but to turn on logging in whatever cases the developer needs it.
P.S. Can do a PR if this is something that sounds good.
Hello! I was wondering if your package support this: https://support.google.com/firebase/answer/6317485 without doing anything with it or otherwise I have to log all events manually. So for example if I want to log first_open or app_update, does this package do it automatically? Or have I to log it manually an put this on my app?
Thanks!
Hi! Thanks first of all!
Could you add this feature https://firebase.google.com/support/guides/disable-analytics ?
Hello,
I installed the package and linked it , but everytime I try to run the project with react-native run-android I get one of these errors in the console:
:app:transformClassesWithDexForDebug or ':app:processDebugGoogleServices'
Android Studio doesn't give me any errors.
Any ideas ?
Thanks !
So where do we need to put the code
var Analytics = require('react-native-firebase-analytics');
componentWillMount() {
if (environment === 'staging') {
Analytics.setEnabled(false);
}
Analytics.setUserId('11111');
Analytics.setUserProperty('propertyName', 'propertyValue');
Analytics.logEvent('view_item', {
'item_id': 'login'
});
}
on every screen.js / index.ios.js ? and what is UserID? is that custom property or property defined from Google?
Dear Developer!
How are you?
Thanks for your module.
But I can't see any analytics on Firebase Console.
I added all as what written in ready.
If you help me, I will do my best for you.
Please help me!
I create a user, and then fire a bunch of events and I want to see the order in which a given user took those events. I don't see anything like a user profile in the firebase analytics dashboard. What am I missing?
Hi guys,
I have already installed firebase module (firebase-js-sdk) to my react-native project. Will there be a conflict if I install this module to my current project?
thanks,
Hi
thank you for making this module. I ran the setup instructions but when trying to reference the module, it looks like var FIRAnalytics = NativeModules.RNFIRAnalytics;
is undefined. What am I missing?
Hello. in order to make [FIRApp configure]; work in the ios setup, I had to do @import Firebase; (Objective-C) instead of #import 'FCMModule.h' in my AppDelegate.
I got this from https://firebase.google.com/docs/ios/setup
Did I do something wrong ? or this way is also ok?
ty
There are several things I encountered when installing this native module that I would've appreciated if it was documented. Feel free to add these to the README.
new FIRAnalyticsPackage()
in the getPackages()
method in MainApplication.java.I am not sure how we can use this package to identify a unique installation of the App (i.e. get the Ad Id).
See here:
https://support.google.com/firebase/answer/6318039
How can we do this?
It says:
On iOS, the SDK collects the Advertising Identifier if it is available. For IDFA to be available, a developer has to link in the following libraries:
libAdIdAccess.a
AdSupport.framework
Is this added by you? If we add it it will work somehow?
Is there a way to track screen view particular to a user as we do in google analytics ?
Hi,
I cannot get your plugin work because this error:
* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zze;
Do you know how to solve this?
Thanks!
Hi.
I have found some trouble when import the library in my current workspace. You are linking to the latest firebase-core/firebase-analytics version using the "+" operator in the Gradle file (compile 'com.google.firebase:firebase-core:+', compile 'com.google.firebase:firebase-analytics:+'). Two things about this: firebase-analytics is inside the core package(see documentation: https://firebase.google.com/docs/android/setup), the other is that the "+" operator is discouraged (android studio warns about it), instead you must use a concrete versión of the library.
I think that you must change this operator and provide different versions for every new release of firebase library, thus the project will have dependencies over a concrete version, not the latest, who can break the workspace code.
If you cannot made it, i can help you with some pull requests.
Best regards.
Hi, I'm using 1.0.6 of this library and I'm seeing this native error on Android when calling FirebaseAnalytics.setScreenName(..)
:
02-22 13:11:19.307 24940-25017/com.myapp W/FA: setCurrentScreen must be called from the main thread
.
About pod: This is the only package that requires pod and pod is a different build method with which I had problems before.
Is there any plan to not use pod and just have it work with the react-native link logic?
Thanks!
Whenever I run react-native run-android
I get this error:
Could not find any matches for com.google.firebase:firebase-core:9.+ as no versions of com.google.firebase:firebase-core are available.
Can someone help me with this issue? I did exactly what that readme says.
When compiling the app with xcode I get this error:
/Users/herve76/Desktop/Fishii/node_modules/react-native-firebase-analytics/ios/RNFIRAnalytics.m:42:17: No known class method for selector 'setScreenName:screenClass:'
and with android:
:react-native-firebase-analytics:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/herve76/Desktop/Fishii/node_modules/react-native-firebase-analytics/android/src/main/java/com/evollu/react/fa/FIRAnalyticsModule.java:50: error: cannot find symbol
FirebaseAnalytics.getInstance(getReactApplicationContext()).setCurrentScreen(currentActivity, name, null);
^
symbol: method setCurrentScreen(Activity,String,<null>)
location: class FirebaseAnalytics
1 error
:react-native-firebase-analytics:compileReleaseJavaWithJavac FAILED
I really want to use this package. Can someone help me find a solution to this issue please?
This might be a duplicate of #18
I believe I am doing this right. I am trying to log all my redux actions like this:
function analytics (state = 0, action = {}) {
const { type, ...rest } = action
// ignore all the following events for analytics
switch (type) {
case types.__INIT__:
case types.REHYDRATE:
case types.router.PUSH:
case types.router.REFRESH:
return state
// by default, log everything possible
default:
Analytics.logEvent(type, {'action': JSON.stringify(rest)})
return true
}
}
But this is how they end up on firebase:
How can I fill the value
field?
Trying to build with Gradle 2.2.3.
I followed the instructions for installation react-native-firebase-analytics, adding stuff to build.gradle files etc.
Getting this error when I do "gradlew.bat installDebug --stacktrace":
google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be
used.
please apply google-services plugin at the bottom of the build file.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
> Configuration with name 'default' not found.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:74)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:61)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:540)
at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:93)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:47)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:124)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:121)
at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51
)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28
)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':app:_debugApk'.
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationRe
solver.java:70)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver
.java:45)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:372
)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:347)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:3
40)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
at com.android.build.gradle.internal.DependencyManager.collectArtifacts(DependencyManager.java:497)
at com.android.build.gradle.internal.DependencyManager.gatherDependencies(DependencyManager.java:375)
at com.android.build.gradle.internal.DependencyManager.resolveDependencyForConfig(DependencyManager.java:278)
at com.android.build.gradle.internal.DependencyManager.resolveDependencies(DependencyManager.java:155)
at com.android.build.gradle.internal.TaskManager.resolveDependencies(TaskManager.java:364)
at com.android.build.gradle.internal.VariantManager$9.call(VariantManager.java:636)
at com.android.build.gradle.internal.VariantManager$9.call(VariantManager.java:633)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
at com.android.build.gradle.internal.profile.SpanRecorders.record(SpanRecorders.java:44)
at com.android.build.gradle.internal.VariantManager.createVariantData(VariantManager.java:629)
at com.android.build.gradle.internal.VariantManager.createVariantDataForProductFlavors(VariantManager.java:823)
at com.android.build.gradle.internal.VariantManager.populateVariantDataList(VariantManager.java:494)
at com.android.build.gradle.internal.VariantManager$1.call(VariantManager.java:269)
at com.android.build.gradle.internal.VariantManager$1.call(VariantManager.java:266)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:265)
at com.android.build.gradle.BasePlugin$11.call(BasePlugin.java:688)
at com.android.build.gradle.BasePlugin$11.call(BasePlugin.java:685)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:683)
at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:608)
at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:605)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
at com.android.build.gradle.BasePlugin.lambda$createTasks$1(BasePlugin.java:603)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy12.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:67)
... 44 more
Caused by: org.gradle.api.artifacts.UnknownConfigurationException: Configuration with name 'default' not found.
at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.createNotFoundException(DefaultConfiguratio
nContainer.java:92)
at org.gradle.api.internal.DefaultNamedDomainObjectCollection.getByName(DefaultNamedDomainObjectCollection.java:229)
at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.jav
a:82)
at org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.getByName(DefaultConfigurationContainer.jav
a:37)
at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency.getProjectConfiguration(DefaultProjectDependency.j
ava:69)
at org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency_Decorated.getProjectConfiguration(Unknown Source)
at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.ProjectIvyDependencyDescriptorFactory.createDepe
ndencyDescriptor(ProjectIvyDependencyDescriptorFactory.java:40)
at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.DefaultDependencyDescriptorFactory.createDepende
ncyDescriptor(DefaultDependencyDescriptorFactory.java:35)
at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.DefaultDependenciesToModuleDescriptorConverter.a
ddDependencies(DefaultDependenciesToModuleDescriptorConverter.java:43)
at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies.DefaultDependenciesToModuleDescriptorConverter.a
ddDependencyDescriptors(DefaultDependenciesToModuleDescriptorConverter.java:36)
at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.DefaultConfigurationComponentMetaDataBuilder.addDependencies(
DefaultConfigurationComponentMetaDataBuilder.java:51)
at org.gradle.api.internal.artifacts.ivyservice.moduleconverter.DefaultConfigurationComponentMetaDataBuilder.addConfiguration
s(DefaultConfigurationComponentMetaDataBuilder.java:39)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.toRootComponentMetaData(DefaultConfiguration.java:55
7)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$DefaultResolveContextToCompon
entResolver.resolve(DefaultArtifactDependencyResolver.java:144)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.jav
a:74)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDepe
ndencyResolver.java:90)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDepe
ndencyResolver.java:80)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDepend
encyResolver.java:80)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyRe
solver.java:41)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependency
Resolver.java:39)
at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:91)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver.resolve(SelfResolvingDependencyC
onfigurationResolver.java:40)
at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolve(ShortCircuitEmptyConfiguration
Resolver.java:52)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver
.java:43)
... 84 more
BUILD FAILED
Total time: 4.749 secs
thats what I see when I try to install react-native-firebase-analytics in my project. What I do wrong? Sorry for the stupid question, and thanks in advance
Hello,
I installed the package with
npm install react-native-firebase-analytics --save
then I tried to link it with
react-native link
.
This did nothing, so I linked the library manually:
MainApplication.java:
import com.evollu.react.fa.FIRAnalyticsPackage; ... new FIRAnalyticsPackage()
android/app/build.gradle (bottom of the file):
dependencies { ... compile project(':react-native-firebase-analytics') } apply plugin: 'com.google.gms.google-services'
android/build.gradle:
dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.google.gms:google-services:3.0.0' }
settings.gradle:
include ':app', ':react-native-firebase-analytics' project(':react-native-firebase-analytics').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-firebase-analytics/android')
Still i get this error when compiling:
error: cannot find symbol import com.evollu.react.fa.FIRAnalyticsPackage;
Any Ideas?
Hello,
I have introduced the analytics on my project but no events are logged on the firebase dashboard.
After registering the user I do like:
Analytics.logEvent(type, content)
I don't get any error but neither reports on the console. Any tip with this?
When installing latest version I get the following error. I've installed manually v1.0.5 to avoid this error for now .
/projectDir/node_modules/react-native-firebase-analytics/android/src/main/java/com/evollu/react/fa/FIRAnalyticsModule.java:50: error: cannot find symbol
FirebaseAnalytics.getInstance(getReactApplicationContext()).setCurrentScreen(currentActivity, name, null);
^
symbol: method setCurrentScreen(Activity,String,<null>)
location: class FirebaseAnalytics
1 error
:react-native-firebase-analytics:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
This package includes a list of reserved event names which doesn't include "screen_view". So tracking events manually using logEvent("screen_view")
will actually fail. I encountered this since setCurrentScreen(...)
doesn't actually track anything and the automatic tracking doesn't work (likely because RN projects usually don't use native navigation components.
Fix is simply to add 1 line in lib/modules/analytics/index.js
in the const ReservedEventNames
array: 'screen_view'
Thanks
using "react": "15.3.2", "react-native": "0.35.0", "react-native-firebase-analytics": "^1.0.5"
Devices I use is => Android 7.0, API Level: 24
I have followed the README setting and want to use logEvent.
I just use the README sample code to logEvent, but I got this error as below:
var Analytics = require('react-native-firebase-analytics');
Analytics.logEvent('view_item', { 'item_id': 'login' });
undefined is not an object (evaluating 'FIRAnalytics.logEvent')
logEvent
index.js:19
index.android.js:17
loadModuleImplementation
require.js:122
guardedLoadModule
require.js:58
_require
require.js:49
global code
require-0.js:1
Could you help me to figure out what cause this problem?
Thank you
Is there anyway to enable verbose logging to view in the debug console? https://firebase.google.com/docs/analytics/ios/events#view_events_in_the_xcode_debug_console
React Native version: 0.40
Error:
/node_modules/react-native-firebase-analytics/ios/RNFIRAnalytics.h:4:9: fatal error: 'FirebaseCore/FIRApp.h' file not found
#import <FirebaseCore/FIRApp.h>
^
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/Enes/RN/Tviz/ios/build/Build/Intermediates/RNFIRAnalytics.build/Debug-iphonesimulator/RNFIRAnalytics.build/Objects-normal/x86_64/RNFIRAnalytics.o RNFIRAnalytics.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Hi,
I can't build app when I add to this line on project/android/app/build.gradle
apply plugin: "com.android.application"
//apply plugin: 'com.google.gms.google-services' // <-This line Add this line for analytics
import com.android.build.OutputFile
ERROR;
FAILURE: Build failed with an exception.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/firebase/FirebaseException;
Please help me,
Thanks
I am getting this error with RN 0.40 Xcode 8.2.1. Any idea why?
I'm getting this error when I link the dependency:
Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/api/zza.class
How do I know which version of the SDK this RN wrapper is using for Firebase Analytics?
I installed the module and use #import "Firebase.h"
in AppDelegate.m
successfully (file found). However in RNFIRAnalytics.xcodeproj
, RNFIRAnalytics.h
has an error file not found with #import "Firebase.h"
and build failed. Am I missing something? Thanks.
Hi!
Thanks for the component.
Is there a way to track certain user action with this component (for example, certain user clicks, searches, etc)?
If I correctly understand, I need to get Device ID and track user according to it. So I need to write a bridge ObjectiveC - RN for this? Or there any other ways to do it?
Hi,
I followed the installation direction as described in this repo.
However, I got the following error when I run react-native run-android
.
Am I missing anything?
JS server already running.
Running /Users/me/Library/Android/sdk/platform-tools/adb reverse tcp:8081 tcp:8081
Building and installing the app on the device (cd android && ./gradlew installDebug...
google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used.
please apply google-services plugin at the bottom of the build file.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Cannot evaluate module react-native-firebase-analytics : Configuration with name 'default' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.929 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Thanks for your help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.