36

Accept my apologies in advance if this is the incorrect place to post this question as I am unsure what would be.

What I am trying to accomplish is to record a custom even using Firebase analytics that produces a similar report in the Firebase console to their example of the select_content event. It is triggered as follows:

    FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
    Bundle bundle = new Bundle();
    bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "ID");
    bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "NAME");
    bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
    mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);

and more specifically the string after FirebaseAnalytics.Param.CONTENT_TYPE can be any value and will produce a report in the console as shown below:

I create my own custom events as:

Bundle params2 = new Bundle();
params2.putString(FirebaseAnalytics.Param.VALUE, "Google Play Games Sign out Button");
mFirebaseAnalytics.logEvent("Main_Activity_Button_Pressed", params2);

and the report produced for this event shown below does not appear to take into account the value I have added.

enter image description here

Is it possible to accomplish what I am trying to do, and if so what is the correct way to implement this?

Update: Seems this is not possible for testing purposes as I recently discovered this:enter image description here

which explains why my custom parameters do not appear in the console.

ez4nick
  • 9,756
  • 12
  • 37
  • 69
  • Hi, i have issue with custom event passed as a param like Bundle loBundle = new Bundle(); loBundle.putString(FirebaseAnalytics.Param.ITEM_NAME, moAllAdapter.getItem().get(position).getProjectName()); mFirebaseAnalytics.logEvent("List_item_selected", loBundle); and i filter out this in audience, by adding manually param name and value but i cant see data or event report. how can i see this bundle value? – RaRa Jul 06 '16 at 05:38
  • I can not get it. finally you can pass your custom event "value" or not? I created the custom event and it shown on fire base, but there is no where to see the value. (I do not use "FirebaseAnalytics.Param.VALUE" and I put my custom key) – Mahdi Apr 23 '17 at 04:59

4 Answers4

13

I believe any params attached to a custom event are considered custom params (even if you use those from FirebaseAnalytics.Param class) and therefore the values are not represented directly in your reports as per the docs here:

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.

AdamK
  • 21,199
  • 5
  • 42
  • 58
  • 1
    I can not get it. finally you can pass your custom event "value" or not? I created the custom event and it shown on fire base, but there is no where to see the value. (I do not use "FirebaseAnalytics.Param.VALUE" and I put my custom key) – Mahdi Apr 23 '17 at 04:59
8

First, credit to AdamK for adding this:

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.

But, something I discovered is:

enter image description here

which would explain why my custom parameters do not appear as I am the only tester.

Community
  • 1
  • 1
ez4nick
  • 9,756
  • 12
  • 37
  • 69
  • So, what does one do in order to test custom parameters reports? – noti Jul 14 '16 at 10:54
  • 2
    So just to be clear, the custom parameters did show up eventually when you had more than 10 users sending events? – Edward van Raak Jan 17 '17 at 09:25
  • i am still trying to wrap my head around custom events but did manage to find out that you can test custom events in the log, see here https://firebase.google.com/docs/analytics/android/events#view_events_in_the_android_studio_debug_log – Clive Sargeant Jan 25 '17 at 12:56
7

Your data may not be displayed because you have assigned a String value to FirebaseAnalytics.Param.VALUE in the bundle.

According to the FirebaseAnalytics docs on Param.VALUE:

A context-specific numeric value which is accumulated automatically for each event type. Value should be specified with putLong(String, long) or putDouble(String, double). This is a general purpose parameter that is useful for accumulating a key metric that pertains to an event.

To log a String, you may consider using Param.CONTENT_TYPE or your own custom parameter.

Eric
  • 71
  • 3
4

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.

Steve Ganem
  • 10,591
  • 2
  • 39
  • 32