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
[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.
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).
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.
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
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.
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.
Related
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
[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.
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).
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.
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
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.
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.
I'm using this code to analyse the sign_up method user is using:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.SIGN_UP_METHOD, "sign_up_method");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SIGN_UP, bundle);
as soon as the user sign up, above given code is supposed to save the event in the Firebase console.
The problem is that the event is getting created but the there's nothing under the value column, i.e., sign_up_method is not getting shown.
Here's a snapshot from the console (event name: sign_up is there but in place of the sign_up_method, there is a -):
What's going wrong here?
Please let me know.
I asked the same question from the Firebase Support Team and they told me that
Unfortunately, not all parameters are represented directly in your
Analytics reports. It is only available on a subset of suggested
events. But they can be used as filters in Audience definitions for
every report. They are also included in data exported to BigQuery if
your app is linked to a BigQuery project.
So, either link your app to BigQuery or get satisfied with what Firebase has to provide.
Please check the Firebase Analytics docs for this. Looks like you are incorrectly setting the parameter as FirebaseAnalytics.Param.SIGN_UP_METHOD
It should be FirebaseAnalytics.Param.METHOD instead
This question already has answers here:
Firebase Analytics custom events params
(6 answers)
Closed 6 years ago.
I have just started using Firebase for my app's analytics and I'm having some issues trying to view custom parameters associated with my events.
The problem is that when creating an audience, I can see all the events but cannot drill down to the parameters (no parameters are shown associated to the events)
As an example, I'd like to register the event "Add retail to favourite" and pass, as a parameter, the ID of the retail. The final goal is to assess how many users had added a certain retail to their favourite list.
For iOS I'm using this piece of code:
[FIRAnalytics logEventWithName:#"add_retail_to_favorite" parameters:#{#"id_retail":idRetail}];
And for Android:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, String.valueOf(mId));
mFirebaseAnalytics.logEvent("pv_detail", bundle);
Am I doing anything wrong?
Thanks for your support
Currently, all custom parameters are available in the BigQuery export. Not all the custom parameters are available in the standard reports in the console.
For more details, see
Firebase Analytics custom events params
We are looking for ways of improving the reports, and better support custom parameters is something we are considering.
I made an Android app and I have integrated some tools of Firebase, but when I include the Firebase Analytics in the event APP_OPEN Android Studio shows that "I need out bundle", but in the docs of Firebase the method I should not send bundle. How resolve this problem?
The Bundle parameter is nullable. You can pass null if you don't intend to pass any parameters along with the APP_OPEN event. Note that even if no parameters are suggested for APP_OPEN, you are free to log up to 25 parameters in case you have some context that you would like to capture with the event (for example, you could pass a parameter that indicates how much time has elapsed since the previous APP_OPEN event).
I am trying to send the custom data in google analytics version 4 where the sending procedure seems to be different then previous version, I have create a custom dimention from google analytics web page then with the corresponding index I am sending the repective value as mention below,
Tracker tracker = ((Application) getApplication())
.getTracker(TrackerName.APP_TRACKER);
tracker.send(new HitBuilders.AppViewBuilder()
.setCustomDimension(1, "info1")
.build());
tracker.send(new HitBuilders.AppViewBuilder()
.setCustomDimension(2, "info2")
.build());
from the logs it seems that the data is send but not sure as I am unable to view any data in the google analytics web page.
You'll have to create a custom report and select the custom dimension, and any metrics associated with that custom dimension. For some reason Google hasn't (and who knows if they will) update the Custom Variables report.
You can define a custom report (Google Analytics > Customization (top tab)), but you need to make sure you select the right Metric or your information will not appear (e.g. ga:hits). https://support.google.com/analytics/answer/1151300?hl=en
Alternatively you can query the information through Google Analytics Query Explorer, although not choosing the correct dimension / metric will result in no data to appear (e.g. ga:dimension1 + ga:hits). http://ga-dev-tools.appspot.com/explorer/
Obviously might take a few good seconds / couple of minutes for information to be available, and important for fresh information make sure the date range includes today (yes, it happens to best of us to refresh furiously and find out Google Analytics date range was up to yesterday :-)
Developer reference (for anyone else looking for it): https://developers.google.com/analytics/devguides/collection/android/v4/customdimsmets