我在 Unity 游戏中实施 Google Analytics 来跟踪用户及其事件。我正在使用他们的大部分预定义事件以及其他一些事件。问题是,这些事件都没有显示在仪表板中。唯一显示的事件是默认事件。
是否需要执行更多操作才能显示事件?
我还在构建 XCode 项目时添加了该标志以在 Firebase DebugView 中显示,但显示了相同的事件。
FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task =>
{
var dependencyStatus = task.Result;
if (dependencyStatus == DependencyStatus.Available)
{
Debug.Log("FirebaseApp is available");
firebaseApp = FirebaseApp.DefaultInstance;
// where app is a Firebase.FirebaseApp property of your application class.
// Set a flag here indicating that Firebase is ready to use by your
// application.
Debug.Log("Calling SetAnalyticsCollectionEnabled(true)");
FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
// Firebase is ready for use
FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventAppOpen); // Example event
Debug.Log("Logigng EventAppOpen");
}
else
{
Debug.LogError("Could not resolve all Firebase dependencies: " + dependencyStatus);
}
});
以下是我们发送的一些事件:
FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventEarnVirtualCurrency, FirebaseAnalytics.ParameterCurrency, 1);
FirebaseAnalytics.LogEvent($"level_turn_{levelNumber}", new Parameter("turn", turnNumber));
这是我看到的一些日志的片段:
objc[475]: Class FIRAAdExposureReporter is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9b00) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3b30). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAConditionalUserProperty is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9b50) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3b80). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAConditionalUserPropertyController is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9ba0) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3bd0). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAEvent is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9bf0) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3c20). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAIdentifiers is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9c40) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3c70). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAMeasurement is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9c68) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3c98). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAnalytics is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9cb8) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3ce8). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAnalyticsConnector is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9d08) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3d38). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAScreenViewReporter is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9d80) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3db0). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAUserAttribute is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9dd0) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3e00). One of the two will be used. Which one is undefined.
objc[475]: Class FIRAValue is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9e20) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3e50). One of the two will be used. Which one is undefined.
objc[475]: Class FIRConnectorUtils is implemented in both /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/MyApp (0x104bf9e48) and /private/var/containers/Bundle/Application/14207F34-3777-4A1B-AA8E-EF9E6D5C9CE9/MyApp.app/Frameworks/UnityFramework.framework/UnityFramework (0x110ed3e78). One of the two will be used. Which one is undefined.
您好,您找到解决方案了吗?我也遇到同样的问题。