Analytics events not being logged to Firebase
Solution 1
One quick thing to check -- make sure your date range encompasses the date on which this event was logged. For example, if the event was logged today, you should change the date range to explicitly include Today. Ranges like "Last 30 Days" or "Last 7 Days" do not include Today.
If you don't see your reports update, you should contact support in order to get to the bottom of it more quickly.
Solution 2
This may be one reason for custom events
Event name must contain only letters, numbers, or underscores.
My events were not logged as I was using a space in my event name.
Solution 3
Just for those unfortunate subjects (like myself) that get to this question while not seeing ANY Firebase analytics output anymore (no events in the Firebase console online and no local Firebase debug messages). For whatever reason, by accident, I removed the code that used to call
FIRApp.configure()
No matter what other flags or such I set, Analytics events that always worked fine before wouldn't show up. And the logging code still worked without any complaints -- just not doing anything apparently. The configure()
call was the last thing that I came to check.
![random](https://i.stack.imgur.com/emBBd.png?s=256&g=1)
random
Updated on June 26, 2022Comments
-
random about 2 years
I'm attempting to log simple analytic events to Firebase but nothing is ever showing up online.
Here is how I'm logging the event:
FIRAnalytics.logEventWithName("spot_view", parameters: [ "spot_name": spotName, "is_private": isPrivate ])
I have the run time arguments on to see the Firebase output and I get this:
<FIRAnalytics/DEBUG> Event logged. Event name, event params: spot_view, { "_o" = app; "is_private" = 1; "spot_name" = TestLogSpotView; }
So the event is being triggered. I also get this showing that data is actually being uploaded:
2016-06-09 12:12:13.567 [60279:] <FIRAnalytics/DEBUG> Measurement data sent to network. Timestamp (ms), data: 1465488733550, <ACPMeasurementBatch 0x7de7bb60>: { bundles { protocol_version: 1 events { params { name: "_c" int_value: 1 } params { name: "_o" string_value: "auto" } name: "_f" timestamp_millis: 1465488710347 } events { params { name: "_et" int_value: 1 } params { name: "_o" string_value: "auto" } name: "_e" timestamp_millis: 1465488710347 } events { params { name: "_o" string_value: "app" } params { name: "is_private" int_value: 1 } params { name: "spot_name" string_value: "TestLogSpotView" } name: "spot_view" timestamp_millis: 1465488710411 } events { params { name: "content_type" string_value: "cont" } params { name: "_o" string_value: "app" } params { name: "item_id" string_value: "1" } name: "select_content" timestamp_millis: 1465488710411 } user_attributes { set_timestamp_millis: 1465488710347 name: "_fot" int_value: 1465491600000 } upload_timestamp_millis: 1465488733550 start_timestamp_millis: 1465488710347 end_timestamp_millis: 1465488710411 platform: "ios" os_version: "9.3" device_model: "x86_64" user_default_language: "en-us" time_zone_offset_minutes: -240 app_store: "manual_install" app_id: “——“ app_version: "0.0.0" gmp_version: 3200 uploading_gmp_version: 3200 resettable_device_id: “—“—— limited_ad_tracking: false app_instance_id: “———“ bundle_sequential_index: 1 gmp_app_id: “———“ firebase_instance_id: “———“ app_version_major: 106 } } 2016-06-09 12:12:13.568[60279:] <FIRAnalytics/DEBUG> Uploading data. Host: https://app-measurement.com/a 2016-06-09 12:12:13.595[60279:] <FIRAnalytics/DEBUG> Received SSL challenge for host. Host: https://app-measurement.com/a 2016-06-09 12:12:13.731[60279:] <FIRAnalytics/DEBUG> Successful upload. Got network response. Code, size: 204, 0
I ran this same code a couple of days ago and still nothing has showed up in Firebase.
I've also tried logging an event copied straight from Firebase which is this:
FIRAnalytics.logEventWithName(kFIREventSelectContent, parameters: [ kFIRParameterContentType:"cont", kFIRParameterItemID:"1" ])
Which you can see in the log console output posted above.
The only other thing I could think would be wrong is in the GoogleService-Info.plist. There is an entry for
IS_ANALYTICS_ENABLED
which is set to no. I just flipped it toYES
and going to try again although I don't believe this to be the fix. I think this entry only applies to Google Analytics.
Which also, other data such as device type and user sessions IS being logged. So it just logging events that doesn't work.
-
random about 8 yearsah, setting the date range to "Today" had the data show up. That doesn't seem correct though, the data was posted yesterday, however it only shows up under "Today" date setting? Is this intended behavior?
-
random about 8 yearsalso, do you have any idea why custom parameters are not showing up in the dashboard? Is that something you can only see when exporting to BigQuery?
-
Steve Ganem about 8 yearsCurrently, your business's time zone is not taken into account and so the cutoff for the day may not match your expectations. Re: Events, parameter reporting is provided for many of the suggested events (like select_content) but not custom events. You can, however, use all of your custom events and parameters in audience definitions. I suggest that you maximize your usage of suggested events and parameters. And if you need reporting around your custom parameters, I do suggest you take a look at BigQuery..
-
random about 8 yearsI appreciate the response very much. Which one more question, in order to link to BigQuery, we'll need to upgrade our Firebase account to a paid account...then also pay for BigQuery. Correct? Or are all of those wrapped into the one "Pay as you go" plan?
-
Steve Ganem about 8 yearsIn order to link to BigQuery, you should update to the Blaze plan (i.e. pay as you go). And your BigQuery costs will then follow BigQuery's pricing. BQ offers a 1 TB/mo free query tier, so it's worth checking out : cloud.google.com/bigquery/pricing
-
DanielZanchi over 2 yearsparameters without a value get skipped but the event should be sent anyway.