I have 10 events which I am logging to Firebase Analytics. All 10 events have same 4 parameters named Category, Value, Action and Label.(All are text except value which is a int)
I see the logged events in Firebase Analytics under "Events". But I cannot see the value of parameters for each event. After some research i figured out that we have to add event parameters from the Firebase console. So i clicked on "Edit Parameter Reporting" and added the four parameters mentioned above which increased the value of Global parameters registered. Now i want to add the same parameters for all remaining 9 events but I cannot figure out a way to use the same global parameter in each event. When i started to add same parameters to all events separately by the time i was in my 4th event the limit(10) for text parameters exceeded.
In short: I want to use same 3 text parameters for all my 10 events. but registering 3 text parameters for all event separately exceeds the text param limit by the time I am at fourth event. I want to see these params value for all events. Please help. Here's how i am logging events:
public static void logAnalyticsEvent(Context context, String eventName, String category, String action, String label, int value){
FirebaseAnalytics firebaseAnalytics;
firebaseAnalytics = FirebaseAnalytics.getInstance(context);
Bundle bundle = new Bundle();
bundle.putString(AnalyticsConstants.Param.CATEGORY, category);
bundle.putString(AnalyticsConstants.Param.ACTION, action);
bundle.putString(AnalyticsConstants.Param.LABEL, label);
bundle.putInt(AnalyticsConstants.Param.VALUE, value);
firebaseAnalytics.logEvent(eventName,bundle);
}
The events logged by this are visible in Firebase Analytics under Events tab but clicking on event I am unable to see the value of the parameters.
I got around the issue of category and action by concatenating them to the event name.
ie settings_edit_pressed = (category)_(event name)_action
But at the end of the day you still need label to show differences in that action. You can't concatenate label because you'll have millions of events each named alert_input_xxxxx
So if you don't need label or value then hopefully this helps but this certainly isn't a good answer if you need dynamic changes :(
Apparently BigQuery might be another solution but I don't know if you have access to parameters that exceeded the global limits.
Related
I successfully intergarted Google Calendar API. I'm able to do CRUD. But now because of some requirements, I want to send some unique id to each events while creating from android app. For that I found one method called .set() this is a key value pair.
Event event = new Event()
.set("appointment_id", 55475)
.setSummary(summary)
.setLocation(location)
.setDescription(des);
But while fetching, I'm getting all data except event.get("appointment_id")
Why, even it is setting also. [If I'm doing here before executing insert like this: evetn.get("appointment_id"), I'm getting value, because this is locally I'm chocking]
I checked through debugging as well. See below:
But, I'm not getting when I'm fetching all events from Google calendar:
List<Event> items = events.getItems();
You are using the set method, but this is just an override of the com.google.api.client.json.GenericJson class, I believe this will only add this key-value to the final JSON which will be ignored by the API (as it is not an expected field).
Sincerely I don't know what is the point on creating a custom id when there is one directly integrated in calendar.
If you take a look at the insert method you can see that there is one field called id:
Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. Provided IDs must follow these rules:
characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938
the length of the ID must be between 5 and 1024 characters
the ID must be unique per calendar
Also in the same description for the field:
If you do not specify an ID, it will be automatically generated by the server.
My point being that if you need unique ID for events in calendar there is a built in method that will create them for you. And even if you need to supply your own id's you can do so informing this field.
Let me suggest you the official guide on event creation in which there is a more detailed view on the option you can take creating an Event.
Also look at the documentation for setId as this is the method you should be using instead of set.
Example:
Event event = new Event()
.setId("55475") // This has to be type String
.setSummary(summary)
.setLocation(location)
.setDescription(des);
I have integrated Firebase Analytics in my project. I am logging around 10 different events. I can see all these events on the dashboard.
The issue is I am unable to see parameter values of the event.
Ex.
Bundle bundle = new Bundle();
bundle.putString(AppConstants.PARAM_USER_ID, getUserId());
bundle.putString(AppConstants.PARAM_OFFER_ID, itemDetails.getId());
bundle.putString(AppConstants.PARAM_OFFER_TITLE, itemDetails.getTitle());
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(activity);
mFirebaseAnalytics.logEvent("View_Item", bundle);
As per the above code, I can see the event named "View_Item" on the dashboard. But I can't see the details insight of each event's parameters like userId, item_id and offer title, etc.
Is there any way to see parameter values that?
Que 2. How long text parameter value can support?
Because I tried to log the event in Fabric with over 3k char. In this case, the content was getting cut and there no way to expand the full content in Fabric.
Is this same issue with Firebase?
i've logged a firebase event using the code below in android (a long time ago).
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle params = new Bundle();
params.putString(FirebaseAnalytics.Param.VALUE, String.valueOf(subjectvalue));
params.putString(FirebaseAnalytics.Param.CURRENCY, "IRR");
mFirebaseAnalytics.logEvent("Calculate_Cost_of_Hearing", params);
as you can see in this image the events are being logged and sent to firebase and shown separately but the value indicator still shows zero.
should i change my code in order to make it show the values or should i play with the options ? and my ultimate goal is to know the average values not just the SUM.
I am pretty sure that Value displays 0 because the parameter is bundled as a String. If you use params.putDouble() or putLong() instead of putString() the value should accumulate in the Firebase console.
You will not be able to display the average value per user in the event view since it shows only the accumulated value. If you want to work with the data you will have to connect your Firebase instance to BigQuery, pretty much.
Perhaps you could get the Value included in the "revenue per user" - metric on the Dashboard if you make the event count as revenue, but I have no experience doing that.
I'm making an Android game, where I want to track with Firebase Analytics, how users spend their different ingame currencies. For this, I wrote the following method:
public void trackInAppUpgrades(String id, int upgradePrice, String currencyName) {
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_ID, id);
bundle.putDouble(FirebaseAnalytics.Param.VALUE, (double)upgradePrice);
firebaseAnalytics.logEvent(currencyName, bundle);
}
I've used predefined parameters like ITEM_ID and VALUE and send the event with the name of my currency, as there are several currencies and I want to distinguish them as separate events.
However, when I look at the firebase console and select the event from events, I do not see the parameters I have added to this event:
24hours have passend and there isn't more to see. I've read in the documentation that custom parameters will not show up in the report, but what about custom event with prescribed parameters?
Do I really need to use the predefined events by Google to see any parameters I want to track?
I want to log user search event to Firebase but the Search_Term param value in the Search event doesn't show up in the dashboard. Here my code:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.SEARCH_TERM, searchText);
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SEARCH, bundle);
I have tried to log different event with other param and the param value show up in dashboard correctly!
How can I fix this? Thank you
Currently the search data doesn't appear in the Firebase Analytics dashboard.
Your logging seems indeed correct. To see the data you can use Google BigQuery.
One thing you should do is to ensure that searchText is 36 characters or less, otherwise data will just appear as empty in Firebase (and BigQuery).
In general when struggling with data not appearing one should ensure that the logged events follows the possible combinations of events/parameters as described in https://support.google.com/firebase/answer/6317498 . Also notice that the Firebase Console doesn't show the data instantly after being logged (give it at least 30 minutes).
Update:
Firebase Analytics have later increased the maximum length of event names and parameter name to 40 characters, and the maximum length of string parameter values to 100 characters: https://firebase.google.com/support/release-notes/android#wzxhzdk4version_100_-_november_21_2016wzxhzdk5