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?
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?
I have application which use Firebase SDK and used some predefined event and parameters but some parameters are automatically added but not all parameters
For example Add to cart event
Android :
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, params.get("item_category").toString());
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, params.get("item_name").toString());
bundle.putString(FirebaseAnalytics.Param.ITEM_LOCATION_ID, params.get("item_location_id").toString());
bundle.putString(FirebaseAnalytics.Param.CURRENCY, params.get("currency").toString());
bundle.putDouble(FirebaseAnalytics.Param.VALUE, ((Number) params.get("value")).doubleValue());
bundle.putString(FirebaseAnalytics.Param.COUPON, params.get("coupon").toString());
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, params.get("item_id").toString());
bundle.putLong(FirebaseAnalytics.Param.QUANTITY, ((Number) params.get("quantity")).longValue());
this.firebaseAnalytics.logEvent(FirebaseAnalytics.Event.ADD_TO_CART, bundle);
IOS
[FIRAnalytics logEventWithName:kFIREventAddToCart parameters:#{
kFIRParameterItemCategory:[parameters valueForKey:#"item_category"],
kFIRParameterItemName:[parameters valueForKey:#"item_name"],
kFIRParameterItemLocationID:[parameters valueForKey:#"item_location_id"],
kFIRParameterCurrency:[parameters valueForKey:#"currency"],
kFIRParameterValue:[parameters valueForKey:#"value"],
kFIRParameterCoupon:[parameters valueForKey:#"coupon"],
kFIRParameterItemID:[parameters valueForKey:#"item_id"],
kFIRParameterQuantity:[parameters valueForKey:#"quantity"]
}];
In dashboard, We can see only item_name and value. please help.... thanks in advance
I'm supposing that your params object is a composed array with the similar values
{
"item_category" : "t-shirts",
"item_name" : "abc",
"item_location_id" : "ChIJiyj437sx3YAR9kUWC8QkLzQ",
"currency" : "USD",
"value" : 3.99,
"coupon" : "zz123",
"item_id" : "p7654",
"quantity" : 1
}
If that is the case then you are in the right way to create the event. But you are trying to see the event values in the Parameter Reporting section in the Firebase Console. I analysed based on the image you attached.
If you want to see the event values I recommend check the event dashboard report by clicking on the event name instead of the tab Parameter Reporting, follow this link, it shows you an example of how Firebase Events are organized in the Dashboard Console.
I hope this helps you.
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
I am trying to integrate Firebase RemoteConfig and Analytics with my Android application. Remote configuration part is working but Analytics part is not working. Here is my build.gradle
// Firebase configuration
compile group:'com.google.firebase', name:'firebase-core', version: '9.4.0'
compile group:'com.google.firebase', name:'firebase-config', version: '9.4.0'
// Firebase analytics
compile 'com.google.android.gms:play-services-analytics:9.4.0'
Here is my Activity code.
FirebaseAnalytics firebaseAnalytics = FirebaseAnalytics.getInstance(this);
firebaseAnalytics.setUserId("5107611364");
firebaseAnalytics.setUserProperty("custom_user_property", "custom_user_proerty_value");
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "SomeID");
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, "SomeIDName");
bundle.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "IdType");
firebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundle);
I am trying to publish customer property as well as the event but both of them are not working. I have enabled adb logging and I can see that custom event and property are published. These do not appear on the Firebase Analytics console even after 24hrs. I don't know what is wrong.
#Rakesh - you are looking in the wrong location. You are supplying customID feilds, in your example you are supplying CONTENT_TYPE : IdType. You don't need a minimum of 10 users to see the data...if you only have 1 user that data will appear within 24 hours of that user using your app.
I will say this, initially finding your own custom IDs is not very straight forward...it took me a while to find it too.
The place to find that custom reported info is: Anaylytics - Events - once on this page, click on the actual CONTENT_TYPE you are wishing to track, in your example above, it would be idType
Then on the Content graph you will see your customIDs (ie: someID)...click on someID. In my case (and in my screenshots) my equivelant someIDs are "field, button & select"
and then you will see all the data related to the values (someIDName) you passed into someID.
Now, if idType is not appearing for you then that may because Firebase isn't allowing you to create your own CONTENT_TYPE, I am not certain if you can do that as I have not tried...and in that case you would need to use a predefined CONTENT_TYPE. I am not using a custom idType, I am using CONTENT_TYPE : select_content.
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 ...