I am trying to see which parts of my app are most used, for this I have added a logEvent like this:
Bundle bundle= new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, "action");
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "screen_a");
FirebaseAnalytics.getInstance(context).logEvent(FirebaseAnalytics.Event,VIEW_ITEM, bundle);
The events get logged and I can see in my Dashboard under Events section a view_item entry with the Count, however, when I enter it, I can see the counts, meaning values, but I can't see any values like "screen_a" or "screen_b"...
Since these are not custom events, shouldn't the values be available in the dashboard?
I got the same question as you. By asking email to firebase team, they replied the exact method to watch the log of item_name. Below are the example, I logged an ITEM_NAME "action_getProVersion" with ECOMMERCE_PURCHASE event:
log event in your codes: (You have done this)
Bundle bundle = new Bundle();
//bundle.putString(FirebaseAnalytics.Param.ITEM_ID, itemId);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "action_getProVersion");
//bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.ECOMMERCE_PURCHASE, bundle);
On the firebase event screen, press on the right side,for event "Edit parameter reporting", then add "item_name" and save. (it looks you haven't done this)
After a while, let it log from users event. You will see the events logged with parameter "ITEM_NAME" as the attached screenshot
To Log event in firebase use the code below:
private FirebaseAnalytics mFirebaseAnalytics;
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, getString(R.string.title_activity_quotes));
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "ShareButton");
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "image");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
Add item_name in event page of firebase
Then You can debug from android studio or wait sometime to occur the event, then check in the select_content event in firebase
firebase select-content streamview
Related
I am making a game, in Java for Android.
Here is the code:
Bundle bundle = new Bundle();
bundle.putLong(FirebaseAnalytics.Param.VALUE, count);
bundle.putString(FirebaseAnalytics.Param.VIRTUAL_CURRENCY_NAME, "Coins");
bundle.putString(FirebaseAnalytics.Param.LEVEL, level);
analytics.logEvent(FirebaseAnalytics.Event.EARN_VIRTUAL_CURRENCY, bundle);
Here is what I get in the table:
error_value: "currency"
firebase_error: 19
Everything worked until recently, but now I can not register this event.
Google documentation tells that both parameters VIRTUAL_CURRENCY_NAME and
VALUE are optional.
Another event, SPEND_VIRTUAL_CURRENCY, gets registered without any problems.
What's wrong?
In this manual Get started with Google Analytics there is a section "Start logging events":
Java code
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);
Kotlin code:
firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_ITEM) {
param(FirebaseAnalytics.Param.ITEM_ID, id)
param(FirebaseAnalytics.Param.ITEM_NAME, name)
param(FirebaseAnalytics.Param.CONTENT_TYPE, "image")
}
Questions:
Confusing between FirebaseAnalytics.Event.SELECT_CONTENT in Java the code and FirebaseAnalytics.Event.SELECT_ITEM in the Kotlin code.. The both parameters are different (SELECT_CONTENT vs SELECT_ITEM). Webpage about events: https://firebase.google.com/docs/analytics/events is Service Unavailable.
When I go to the: Firebase -> Analytics -> Events -> select_content: there is: Events in last 30 minutes. I cannot list of all events. I don't see the values of selected event.. I don't see all the select_content events includes values.
I tried to create custom dimension in Custom definitions, I waited 24 hours and I still don't know where to see the event.
Do you know, how to show all Events with values reported by FirebaseAnalytics.Event.SELECT_CONTENT ? Like in old Firebase before update? This is image of the old Firebase select_content:
The new Firebase logging events is not clear at all to me.
Similar post with unaswered good question:
Do you mean that you can get report for some type of select_content event by item_id? Did you try this?
This is how I am logging my custom bundle to the Firebase Analytics :
params.putString("event_name", event_name);
params.putBoolean("env", BuildConfig.DEBUG_MODE);
params.putString("user_id", user_id);
params.putString("time_at", "" + System.currentTimeMillis());
mFireBaseAnalytics.logEvent("SessionExp", params);
String "event_name" is visible but not the data.
The event has been called around 60 times but not showing a single param mentioned above.
Here is my source code of MainActivity
private void initializeFirebaseAnalytic() {
firebaseAnalytics = FirebaseAnalytics.getInstance(this);
firebaseAnalytics.setAnalyticsCollectionEnabled(true);
firebaseAnalytics.setMinimumSessionDuration(500);
}
AFAIK your events events only send if you builded apk is in release mode.
you can send an event like this:
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(App.getInstance());
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, action);
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, label);
mFirebaseAnalytics.logEvent(category, bundle);
Make sure to download the config file (google-services.json) file from the firebase console and put it in your project (app/ folder).Also you can use the firebase assistant for doing all the configurations needed automatically.After that you could use logEvent() method to send event to the firebase dashboard.
I'm working on implementing the Facebook tracking of Purchase event in Android. I followed the guide here https://developers.facebook.com/docs/app-events/android, and made a custom Bundle to send to FB.
The problem is, on the Facebook page of events, I don't see the Value column updated for the Purchase event.
This is the code:
Bundle parameters = new Bundle();
parameters.putString(AppEventsConstants.EVENT_PARAM_CURRENCY, mCurrency);
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_TYPE, mProductType);
parameters.putString(AppEventsConstants.EVENT_PARAM_CONTENT_ID, mPurchaseID);
Double valueToSum = 12.042289; //this is how the price looks like
AppEventsLogger logger = AppEventsLogger.newLogger(this);
logger.logEvent(AppEventsConstants.EVENT_NAME_PURCHASED, valueToSum, parameters);
My problem is that, the valueToSum does not sum in the Facebook Events page. It's always shown as "-".
Any ideas what I am actually doing wrong?
Much appreciated.
It takes a while for the data to update on the dashboard. Try checking it the next day or so ...