Unity Google Analytics Custom Events Not Showing

105 Views Asked by At

I implement Google Analytics in my Unity game to track users and their events. I'm using most of their predefined events along with some others. The issue is, none of these events show up in the dashboard. The only events that show are the default ones.

  • user_engagement
  • screen_view
  • session_start
  • first_open

Is there more to implementing it so the events show up?

I also added the flag when building the XCode project to show in the Firebase DebugView, but the same events show.

 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);
    }
});

Here's a couple of the events we're sending:

FirebaseAnalytics.LogEvent(FirebaseAnalytics.EventEarnVirtualCurrency, FirebaseAnalytics.ParameterCurrency, 1);
FirebaseAnalytics.LogEvent($"level_turn_{levelNumber}", new Parameter("turn", turnNumber));

Here's a snippet of some of the logs I'm seeing:

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.

0

There are 0 best solutions below