Firebase Analytics custom events params
Asked Answered
K

6

72

I am completely new to Firebase analytics. I am trying to send an event which shows statistics about my API call.

endTime = System.currentTimeMillis() - startTime;

// [START event]
Bundle params = new Bundle();
params.putString(FirebaseConstants.PHONE_NUMBER, Utility.getPhone());
params.putLong(FirebaseConstants.DURATION, endTime);
FirebaseAnalytics
            .getInstance(getContext())
            .logEvent(FirebaseConstants.BALANCE_CHECK, params);
// [END event]

But I only see the name of the event, number of users and occurrence count. 24 hours have already passed and I don't see my custom properties. For reference, I want to see a phone number(Utility.getPhone()) and the time which API call takes(endtime). Maybe it is possible that it does not send anything because I created custom params in my FirebaseConstans class

Kudu answered 29/5, 2016 at 8:49 Comment(0)
P
58

[Update, May 2017]

As of May 2017, custom parameter reporting is now supported in Google Analytics for Firebase. Please refer to this help center article for more details.

Pusey answered 29/5, 2016 at 15:46 Comment(10)
Could you please provide some reference for claim that "Currently, parameter reporting is offered only on a subset of suggested events."? Thank you.Exact
"you can link your app to BigQuery and run queries on the raw data there" but to link BigQuery, you need to upgrade your plan to "Blaze". It seems to be I should just use Google Analytics events so I can add that custom data and view without needing to pay for an upgrade to link, yet another service. Very frustrating for early adopters to Firebase!Hoecake
You are saying parameter reporting is offered on suggested events, but I am using them and for some I can't see parameter reporting, for which one can we parameter reporting?Emmittemmons
@guneykayimYes, I'm facing the same problem. I use suggested events with suggested params. But I don't see anything about params in the event report. Have you found out anything yet?Basifixed
@Exact because Steve Ganem is a "Product Manager at Google".. I guess so.Architectonics
@Basifixed I have talked with someone from Firebase over e-mail, and I have been told that I can't display data properly for all suggested events. When I asked which events can I use to see the data properly, they said they can't share that information. So, Steve Ganem, you said "subset" of suggested events. Could you please share that subset, unlike your colleagues that I've been e-mailing for the last week?Emmittemmons
Can you set Value parameter as a boolean for begin_tutorial ? can value be any type ?Arlon
Firebase also does not report on many non-custom, required parameters. Example: The Search event does not report on the search_term parameter. The search_term parameter is not custom, it is the one required parameter of the Search event. What good is reporting on Search events if we don't know what users are searching for without having to go to BigQuery, pay for it, and write custom queries to get at the data. Another example:The View Item event does not report the Item ID or the Item Name... nearly useless reporting out of the box.Lyublin
@Steve Ganem first thanks for clarification. Is it possible to send events to Google Analytics using Google Tag Manager so we can see parameter values of events and filter accordingly in Google Analytics?Blackout
After asking the question i found this enlightening article : firebase.googleblog.com/2017/02/…Blackout
C
15

your custom data and parameters will be available as soon as your audience reach 10 or more, that is a privacy restriction. so just use it in your activity as:

FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putString("some_key", "some_value");
mFirebaseAnalytics.logEvent("some_name", bundle);

it will work (after some time (max 24 hrs) you can see some_name as event in your event view but some_key will be available when audience is 10 or more).

Choosy answered 28/8, 2016 at 9:54 Comment(5)
is there any reference that the audience has to reach 10 or more? didn't read that in the installation guide.Arrowworm
@Maher Nabeel, didn't find exactly quantity of 10 for the audience, but seems that Dmila Ram was right, there is a threshold in displaying some metrics in order not to reveal individual users and their personal featues. \nHere is what it is said: Data thresholds "Thresholds are applied to prevent anyone viewing a report from inferring the demographics or interests of individual users. When a report contains Age, Gender, or Interests, a threshold may be applied and some data may be withheld from the report. " url: support.google.com/firebase/answer/6317486Rb
I did not see my custom event parameters until I installed my app on a bunch of different simulators in order to get my user count up to 12. Suddenly I have data, not empty graphs.Jupon
You may need to generate at least 80-100 events to see the custom parameters, otherwise the parameters will show as zeros or "Not Set".Chelseychelsie
Is there documentation to support that graphs will show zeros until user count is greater than 10?Barling
C
13

As of https://support.google.com/firebase/answer/7397304?hl=en&ref_topic=6317489, you need to register your parameters before they can be shown

When you first set up custom parameters, a data card for it will be added to your event detail report. However, it may take up to 24 hours for any data to appear.

enter image description here

Curiosa answered 6/7, 2017 at 7:40 Comment(2)
You may need to wait until the next day as soon as you've registered your custom parameters, otherwise the parameters will show as zeros or not show at all, which is confusing and odd.Chelseychelsie
Thanks, I had to register the event with another interface thoughFireback
I
7

According to documentation, you have to link with BigQuery to see custom parameters:

Custom parameters: Custom parameters are not represented directly in your Analytics reports, but they can be used as filters in audience definitions that can be applied to every report. Custom parameters are also included in data exported to BigQuery if your app is linked to a BigQuery project.

Source: https://firebase.google.com/docs/analytics/android/events#log_events

Iminourea answered 14/6, 2016 at 8:41 Comment(4)
That's not what the paragraph says... it says: "but they can be used as filters in audience definitions that can be applied to every report. Custom parameters are ALSO included in data exported to BigQuery".Exact
Is it a free part of Big Query? (To can see custom parameters)Ditmore
@cmi no it's not freeEngleman
It seems most non-custom parameters are also not represented. search_term of of the search event, item_id of the view_item event, etc. These are the main required parameters of these events, yet they are not reported on in the Firebase console.Lyublin
E
3

I have contacted firebase support and got response:

Looks like the params don't pre-populate automatically. When creating your audience, you'll have to fill them in yourself.

The thing is, data will be populated only with events coming AFTER creating new audience, you won't get data collected until that moment, which is something I would expect to be the case...

Edit: from firebase support personel

Audiences are not retroactive, so you will indeed need to create them before data will be populated within them. Do note that existing data can still be looked at and queried if linked with BigQuery. Also keep in mind that most audiences will have a minimum threshold which needs to be met before reports are generated for them.

Exact answered 6/7, 2016 at 10:18 Comment(1)
Were you able to capture events parameters after you created some audiences in the Firebase Analytics console. On reading about the Audiences in Firebase and their uses, it doesn't look like it would affect whether parameters are shown for the events or not in the Firebase Analytics console.Vaca
P
2

From https://firebase.google.com/docs/analytics/android/events#log_events

Custom parameters: Custom parameters are not represented directly in your Analytics reports, but they can be used as filters in audience definitions that can be applied to every report.

Pinchas answered 8/9, 2016 at 8:9 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.