Quickstart-unity: iOS Analytics events not showing up

Created on 27 Jun 2017  Â·  17Comments  Â·  Source: firebase/quickstart-unity

Hi!

I put the Firebase plugin in my Unity application and everything went fine (Android version). I tried with the iOS version but it is not logging the events. I know the events take a few hours to appear but they are not appearing either after 1 day or in debug mode.

For debug mode, I've put the "-FIRAnalyticsDebugEnabled" argument, just like the tutorial (https://firebase.google.com/docs/analytics/ios/events#view_events_in_the_xcode_debug_console). On another site (https://support.google.com/firebase/answer/7201382?hl=pt&utm_id=ad), I realized that there is another argument "-FIRDebugEnabled". I tried both of them but none logged my events.

Another thing I noticed is that the "GoogleService-Info.plist" file that I downloaded on the Firebase website comes with the variable "IS_ANALYTICS_ENABLED" = false. It does not say anything in the tutorial (https://firebase.google.com/docs/analytics/unity/start?hl=pt-br) but I put it true.

Am I doing something wrong?

question

All 17 comments

You're enabling data collection
https://github.com/firebase/quickstart-unity/blob/master/analytics/testapp/Assets/TestApp/UIHandler.cs#L66
?

On Tue, Jun 27, 2017 at 11:22 AM, brunok8 notifications@github.com wrote:

Hi!

I put the Firebase plugin in my Unity application and everything went fine
(Android version). I tried with the iOS version but it is not logging the
events. I know the events take a few hours to appear but they are not
appearing either after 1 day or in debug mode.

For debug mode, I've put the "-FIRAnalyticsDebugEnabled" argument, just
like the tutorial (https://firebase.google.com/docs/analytics/ios/events#
view_events_in_the_xcode_debug_console). On another site (
https://support.google.com/firebase/answer/7201382?hl=pt&utm_id=ad), I
realized that there is another argument "-FIRDebugEnabled". I tried both of
them but none logged my events.

Another thing I noticed is that the "GoogleService-Info.plist" file that I
downloaded on the Firebase website comes with the variable
"IS_ANALYTICS_ENABLED" = false. It does not say anything in the tutorial (
https://firebase.google.com/docs/analytics/unity/start?hl=pt-br) but I
put it true.

Am I doing something wrong?

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/91, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AFw1RHocVBpMWWddDfDxgtmbXPKl71xGks5sIUhagaJpZM4OHAfj
.

Yes! I'm enabling data collection like the example.

I guess my xcode console can help (I don't know why exactly it's putting the same code twice):

2017-05-29 12:54:41.638343 brincando[22620:5072036] [Firebase/Analytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters:
post_score,
{
firebase_screen_id (_si) = -396951154609863799;
score = 42;
firebase_screen_class (_sc) = UnityDefaultViewController;
firebase_realtime (_r) = 1;
firebase_debug (_dbg) = 1;
firebase_event_origin (_o) = app;
}
2017-05-29 12:54:41.640 brincando[22620] [Firebase/Analytics][I-ACS023105] Event is not subject to real-time event count daily limit. Marking an event as real-time. Event name, parameters:
post_score,
{
firebase_screen_id (_si) = -396951154609863799;
score = 42;
firebase_screen_class (_sc) = UnityDefaultViewController;
firebase_realtime (_r) = 1;
firebase_debug (_dbg) = 1;
firebase_event_origin (_o) = app;
}

2017-05-29 12:54:41.646107 brincando[22620:5072192] [Firebase/Analytics][I-ACS012018] Saving bundle. size (bytes): 415
2017-05-29 12:54:41.648 brincando[22620] [Firebase/Analytics][I-ACS012018] Saving bundle. size (bytes): 415

2017-05-29 12:54:41.657411 brincando[22620:5072026] [Firebase/Analytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 13, 1496073280620
2017-05-29 12:54:41.658 brincando[22620] [Firebase/Analytics][I-ACS023116] Bundle added to the upload queue. BundleID, timestamp (ms): 13, 1496073280620

2017-05-29 12:54:41.678965 brincando[22620:5072026] [Firebase/Analytics][I-ACS023038] Uploading events. Elapsed time since last successful upload (s): 21.54594898223877
2017-05-29 12:54:41.679 brincando[22620] [Firebase/Analytics][I-ACS023038] Uploading events. Elapsed time since last successful upload (s): 21.54594898223877

2017-05-29 12:54:41.681181 brincando[22620:5072026] [Firebase/Analytics][I-ACS023039] Measurement data sent to network. Timestamp (ms), data: 1496073281675,
2017-05-29 12:54:41.681 brincando[22620] [Firebase/Analytics][I-ACS023039] Measurement data sent to network. Timestamp (ms), data: 1496073281675,

2017-05-29 12:54:41.690525 brincando[22620:5072050] [Firebase/Analytics][I-ACS900000] Uploading data. Host: https://app-measurement.com/a
2017-05-29 12:54:41.690 brincando[22620] [Firebase/Analytics][I-ACS900000] Uploading data. Host: https://app-measurement.com/a

2017-05-29 12:54:41.747085 brincando[22620:5072192] [Firebase/Analytics][I-ACS901006] Received SSL challenge for host. Host: https://app-measurement.com/a
2017-05-29 12:54:41.747 brincando[22620] [Firebase/Analytics][I-ACS901006] Received SSL challenge for host. Host: https://app-measurement.com/a

2017-05-29 12:54:41.849945 brincando[22620:5072050] [Firebase/Analytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, 0
2017-05-29 12:54:41.850 brincando[22620] [Firebase/Analytics][I-ACS023044] Successful upload. Got network response. Code, size: 204, 0

2017-05-29 12:54:41.860015 brincando[22620:5072036] [Firebase/Analytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -0.2379031181335449
2017-05-29 12:54:41.860 brincando[22620] [Firebase/Analytics][I-ACS002002] Measurement timer scheduled to fire in approx. (s): -0.2379031181335449

2017-05-29 12:54:41.860374 brincando[22620:5072036] [Firebase/Analytics][I-ACS023028] Upload task scheduled to be executed in approx. (s): -0.2379031181335449
2017-05-29 12:54:41.860 brincando[22620] [Firebase/Analytics][I-ACS023028] Upload task scheduled to be executed in approx. (s): -0.2379031181335449

2017-05-29 12:54:41.878356 brincando[22620:5072050] [Firebase/Analytics][I-ACS023024] No data to upload. Upload task will not be scheduled
2017-05-29 12:54:41.878 brincando[22620] [Firebase/Analytics][I-ACS023024] No data to upload. Upload task will not be scheduled

2017-05-29 12:54:41.878814 brincando[22620:5072050] [Firebase/Analytics][I-ACS002003] Measurement timer canceled
2017-05-29 12:54:41.880 brincando[22620] [Firebase/Analytics][I-ACS002003] Measurement timer canceled

Have you tried enabling debug view to verify events are being sent from the
device?

https://firebase.google.com/docs/analytics/debugview

From the log it looks like the events are being uploaded somewhere. It
makes me wonder whether your GoogleServices-Info.plist is the config
associated with the project you're trying to log data to.

On Tue, Jun 27, 2017 at 11:58 AM, brunok8 notifications@github.com wrote:

Yes! I'm enabling data collection like the example.

I guess my xcode console can help (I don't know why exactly it's putting
the same code twice):

2017-05-29 12:54:41.638343 brincando[22620:5072036] [Firebase/Analytics][I-ACS023105]
Event is not subject to real-time event count daily limit. Marking an event
as real-time. Event name, parameters:
post_score,
{
firebase_screen_id (_si) = -396951154609863799;
score = 42;
firebase_screen_class (_sc) = UnityDefaultViewController;
firebase_realtime (_r) = 1;
firebase_debug (_dbg) = 1;
firebase_event_origin (_o) = app;
}
2017-05-29 12:54:41.640 brincando[22620] [Firebase/Analytics][I-ACS023105]
Event is not subject to real-time event count daily limit. Marking an event
as real-time. Event name, parameters:
post_score,
{
firebase_screen_id (_si) = -396951154609863799;
score = 42;
firebase_screen_class (_sc) = UnityDefaultViewController;
firebase_realtime (_r) = 1;
firebase_debug (_dbg) = 1;
firebase_event_origin (_o) = app;
}

2017-05-29 12:54:41.646107 brincando[22620:5072192] [Firebase/Analytics][I-ACS012018]
Saving bundle. size (bytes): 415
2017-05-29 12:54:41.648 brincando[22620] [Firebase/Analytics][I-ACS012018]
Saving bundle. size (bytes): 415

2017-05-29 12:54:41.657411 brincando[22620:5072026] [Firebase/Analytics][I-ACS023116]
Bundle added to the upload queue. BundleID, timestamp (ms): 13,
1496073280620
2017-05-29 12:54:41.658 brincando[22620] [Firebase/Analytics][I-ACS023116]
Bundle added to the upload queue. BundleID, timestamp (ms): 13,
1496073280620

2017-05-29 12:54:41.678965 brincando[22620:5072026] [Firebase/Analytics][I-ACS023038]
Uploading events. Elapsed time since last successful upload (s):
21.54594898223877
2017-05-29 12:54:41.679 brincando[22620] [Firebase/Analytics][I-ACS023038]
Uploading events. Elapsed time since last successful upload (s):
21.54594898223877

2017-05-29 12:54:41.681181 brincando[22620:5072026] [Firebase/Analytics][I-ACS023039]
Measurement data sent to network. Timestamp (ms), data: 1496073281675,

2017-05-29 12:54:41.681 brincando[22620] [Firebase/Analytics][I-ACS023039]
Measurement data sent to network. Timestamp (ms), data: 1496073281675,

2017-05-29 12:54:41.690525 brincando[22620:5072050] [Firebase/Analytics][I-ACS900000]
Uploading data. Host: https://app-measurement.com/a
2017-05-29 12:54:41.690 brincando[22620] [Firebase/Analytics][I-ACS900000]
Uploading data. Host: https://app-measurement.com/a

2017-05-29 12:54:41.747085 brincando[22620:5072192] [Firebase/Analytics][I-ACS901006]
Received SSL challenge for host. Host: https://app-measurement.com/a
2017-05-29 12:54:41.747 brincando[22620] [Firebase/Analytics][I-ACS901006]
Received SSL challenge for host. Host: https://app-measurement.com/a

2017-05-29 12:54:41.849945 brincando[22620:5072050] [Firebase/Analytics][I-ACS023044]
Successful upload. Got network response. Code, size: 204, 0
2017-05-29 12:54:41.850 brincando[22620] [Firebase/Analytics][I-ACS023044]
Successful upload. Got network response. Code, size: 204, 0

2017-05-29 12:54:41.860015 brincando[22620:5072036] [Firebase/Analytics][I-ACS002002]
Measurement timer scheduled to fire in approx. (s): -0.2379031181335449
2017-05-29 12:54:41.860 brincando[22620] [Firebase/Analytics][I-ACS002002]
Measurement timer scheduled to fire in approx. (s): -0.2379031181335449

2017-05-29 12:54:41.860374 brincando[22620:5072036] [Firebase/Analytics][I-ACS023028]
Upload task scheduled to be executed in approx. (s): -0.2379031181335449
2017-05-29 12:54:41.860 brincando[22620] [Firebase/Analytics][I-ACS023028]
Upload task scheduled to be executed in approx. (s): -0.2379031181335449

2017-05-29 12:54:41.878356 brincando[22620:5072050] [Firebase/Analytics][I-ACS023024]
No data to upload. Upload task will not be scheduled
2017-05-29 12:54:41.878 brincando[22620] [Firebase/Analytics][I-ACS023024]
No data to upload. Upload task will not be scheduled

2017-05-29 12:54:41.878814 brincando[22620:5072050] [Firebase/Analytics][I-ACS002003]
Measurement timer canceled
2017-05-29 12:54:41.880 brincando[22620] [Firebase/Analytics][I-ACS002003]
Measurement timer canceled

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/91#issuecomment-311452981,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFw1RLwDhvAzbpOS9HlNF0oKYfyRLzzYks5sIVDsgaJpZM4OHAfj
.

Yes, I used the Debug View with the Android version and It works perfectly! =D

I saw two different arguments to use on iOS version, which one is the right one?
1) -FIRAnalyticsDebugEnabled (https://firebase.google.com/docs/analytics/ios/events#view_events_in_the_xcode_debug_console)

2) -FIRDebugEnabled (https://support.google.com/firebase/answer/7201382?hl=pt&utm_id=ad)

Is there some way to check if my GoogleServices-Info.plist it's ok? The bundle Id is the same as my game.

Thanks again!

You need to use -FIRDebugEnabled to enable debug mode.

The easiest way to verify your GoogleServices-Info.plist is to download the
config file from your project on the Firebase Console and use "diff
path_to_plist_in_your_xcode_project path_to_downloaded_plist" to compare
them. The config is not just based upon the game bundle ID, it's also
based upon API key etc.

On Tue, Jun 27, 2017 at 2:26 PM, brunok8 notifications@github.com wrote:

Yes, I used the Debug View with the Android version and It works
perfectly! =D

I saw two different arguments to use on iOS version, which one is the
right one?

1.

-FIRAnalyticsDebugEnabled (https://firebase.google.com/
docs/analytics/ios/events#view_events_in_the_xcode_debug_console
https://firebase.google.com/docs/analytics/ios/events#view_events_in_the_xcode_debug_console
)
2.

-FIRDebugEnabled (https://support.google.com/
firebase/answer/7201382?hl=pt&utm_id=ad
https://support.google.com/firebase/answer/7201382?hl=pt&utm_id=ad)

Is there some way to check if my GoogleServices-Info.plist it's ok? The
bundle Id is the same as my game.

Thanks again!

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/91#issuecomment-311490784,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFw1RA8W7RGrVQVOd8tMilf9LmuruMVWks5sIXOJgaJpZM4OHAfj
.

Ok! I use the -FIRDebugEnabled but still it's not working.

I downloaded a new version of my GoogleServices-Info.plist and tried to diff with the other one in my project and they are the same one.
This GoogleServices-Info.plist comes with the "key > IS_ANALYTICS_ENABLED = false". Is that right? I tried to put true but still I don't receive the events.

Did you follow the debug view instructions with -FIRDebugEnabled ?
https://firebase.google.com/docs/analytics/debugview

Are you 1000% sure the GoogleServices-Info.plist matches the one included
in your xcode project as well?

Did you try our sample application with your GoogleServices-Info.plist to
see whether you get the same behavior?
https://github.com/firebase/quickstart-unity/tree/master/analytics/testapp

On Thu, Jun 29, 2017 at 6:05 PM, brunok8 notifications@github.com wrote:

Ok! I use the -FIRDebugEnabled but still it's not working.

I downloaded a new version of my GoogleServices-Info.plist and tried to
diff with the other one in my project and they are the same one.
This GoogleServices-Info.plist comes with the "IS_ANALYTICS_ENABLED". Is
that right? I tried to put true but still I don't receive the events.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-unity/issues/91#issuecomment-312147367,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFw1RBIgf6AGmRN1lJNtJ77vEjRvh03gks5sJEnBgaJpZM4OHAfj
.

Any update on this?

@brunok8 it's been a few weeks and we haven't heard from you so I'll assume your issue is resolved. Let me know if it isn't.

For anyone finding this, just wanted to call out that enabling data collection (as indicated above) via calling this on your first script will typically fix this issue:

FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);

I had the same issue: worked on android but not iOS. No idea why this works, but they should really make this more clear in the docs for Firebase Analytics if this is a true requirement.

Also confusing was that I did have something in the logs relating to Firebase Analytics before making the SetAnalyticsCollectionEnabled call (below). Note that seeing a single log entry like the line below does not indicate Firebase Analytics is on and tracking properly.

[Firebase/Analytics][I-ACS031010] Tracking view controller.

I am having the same issue . No event are written to firebase .
here my snippet

              if ($window && $window['FirebasePlugin']) {
                 FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);
                 $window['FirebasePlugin'].setUserProperty('logon_type', 'demo');
                 $window['FirebasePlugin'].logEvent("favorites_action", { action: 'add', type: 'business'});
              }

same issue

Jan 19 10:43:25 : [Firebase/Analytics][I-ACS031010] Tracking view controller. Class, ID: UIAlertController, 3989636212487860277
Jan 19 10:43:25 [4871] : [Firebase/Analytics][I-ACS031006] View controller already tracked. Class, ID: UIAlertController, 3989636212487860277

Jan 19 10:43:30 [4871] : [Firebase/Analytics][I-ACS025019] User property not set. Call +[FIRApp configure]: logon_type
Jan 19 10:43:30 [4871] : [Firebase/Analytics][I-ACS025018] Event not logged. Call +[FIRApp configure]: favorites_action

Android works.. cannot get iOS to work

@premtemp it looks like FirebaseApp is not configured, configuring your app using FirebaseApp.CheckAndFixDependenciesAsync() e.g https://github.com/firebase/quickstart-unity/blob/master/analytics/testapp/Assets/TestApp/UIHandler.cs#L41 ?

just a note

FirebaseAnalytics.SetAnalyticsCollectionEnabled(true);

on iOS that is:

AnalyticsConfiguration.shared().setAnalyticsCollectionEnabled(true)

I'm having this same issue and I can't figure out how to fix it.
Has anyone here found a solution?

Having same issue. Getting error:

My environment:
Windows
Visual Studio 2017 version 15.8.9
Nuget Packages:
Xamarin.Firebase.iOS.Analytics - 5.1.4
Xamarin.Firebase.iOS.Core - 5.1.3
Xamarin.Firebase.iOS.InstanceID - 3.2.1

@smhk @stewartmiles , any idea how to fix it in Xamarin Visual Studio?

I am adding following lines
Firebase.Analytics.Loader loader1 = new Firebase.Analytics.Loader(); Firebase.InstanceID.Loader loader2 = new Firebase.InstanceID.Loader(); Firebase.Core.App.Configure(); AnalyticsConfiguration.SharedInstance.SetAnalyticsCollectionEnabled(true);
before return base.FinishedLaunching(app, options);
in
FinishedLaunching event in AppDelegate

@niraj-bpsoftware the Xamarin SDK is authored and maintained by Microsoft and some open source contributors you can report bugs / ask them about it here https://github.com/xamarin/GooglePlayServicesComponents/

Ok thanks @stewartmiles

Was this page helpful?
0 / 5 - 0 ratings