Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Analytics custom events params

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

like image 458
Rustam Ibragimov Avatar asked May 29 '16 08:05

Rustam Ibragimov


3 Answers

[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.

like image 76
Steve Ganem Avatar answered Nov 12 '22 06:11

Steve Ganem


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).

like image 29
Dmila Ram Avatar answered Nov 12 '22 06:11

Dmila Ram


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

like image 26
onmyway133 Avatar answered Nov 12 '22 06:11

onmyway133