I am new in Firebase and I am trying to understand it, I want to track whitch achievements( by my id) my users unlocks
I saw lot of post about this like this where it says
Currently, parameter reporting is offered only on a subset of suggested events. If you need to access your custom parameters, you can link your app to BigQuery and run queries on the raw data there.
So as far as I understand, It should show the values of the suggested events,but I dont even get that values, I am getting the events but not the values, My console shows no values.
I am doing something bad on the code? I am misunderstanding events? Or is Firebase not working as it should?
Code sending to firebase my id
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ACHIEVEMENT_ID, Integer.toString(lm.logros[a].id));
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.UNLOCK_ACHIEVEMENT, bundle);
For accessing all the data(in your case the values part) that you log in Firebase Analytics.. you have to link firebase to use Google Big Query service that's not available for Free.
Related
Disclaimer: I have never worked with firebase or any other DB so my idea is pretty rough and I will be glad if u correct me in some of my assumptions. Also this is my first question on StackOverflow so I hope it will be detailed enough.
I am currently working on my project which is basically a group chat in flutter using firebase, where I should be able to create a new group chat(create a new DB in firestore) trough the app, let other ppl join(assign them to the new group chat DB).
The twist: If I send a message to the group chat I want other ppl to see a pop-up saying: "do you accept this message", no=> doesn't show / yes=> Shows the message but deletes it for others.
This app is nothing but my idea of how to confirm my theory and also learn a little bit more about both flutter and firebase, so please do not mind if it's useful or not.
Assumption: Each groupchat has it's own DB (Can I create a DB in firestore trough app / send request to?)
Question: Can I assign a specific ID to each message and choose and further edit who is going to be able to see the message trough the app(app_instance_1"I accepted the message so only I and sender can see it")?
Here's a great article for making a Flutter chat app: https://medium.com/flutter-community/building-chat-app-in-flutter-with-firebase-888b6222fe20. If you need more detail or help just write a comment.
About your assumption. Each app usually is connected to one database, and within the database, you can have separate documents to hold each group chat. You can also set up documents for each individual user to save the chats that only they can see. Within documents, you add collections that hold your data.
I am new to coding and I am just playing around to build an app where everyone can post new events. So I have already created notes like "user" and "events". The problem I face off is that I dont know how to avoid duplication like for example if two users are posting the excat same event.
I don't want to show them twice in my RecyclerView.
So I have to compare the date, the location and the description, due to this many queries, is the Firebase Realtimedatabase the right "tool"? Or should I use another software.
------/Events
---------/LbwXYVICCl9xd5m..
--------------datum: 10.04.2019
--------------userid: OncDIQis...
--------------location:New York
--------------description:Coldplay
You seem to define two events as being the same based on some of their properties having the same value. In a scenario like that, I'd use those combined properties as the key of the event.
So if you say that two events are the same if they have the same date, location, and description, then you can create the unique key of that event as ${date}_${location}_${description}. For example:
20190410_New York_Coldplay
I've put the date in an easier to search for format, which also filters the .s (since those are not allowed in keys. Now you can store the event under that key:
Events
20190410_New York_Coldplay
datum: 10.04.2019
userid: OncDIQis...
location:New York
description:Coldplay
With the above structure, if another user tries to create an equivalent event, it will get the same key.
Firebase Real-time database is the right tool for you as it updates the database in real time.
At the time of fetching the data from the firebase, you can check whether it is already present in your local database(where you are collecting data fetched from the firebase) or not.
I hope this will help you out.
I want a support on Firebase Analytics Dashboard. I register events with screen name of my iOS and Android app and these values are informations showing correctly on Firebase Dashboard. But an extra parameter is also showing in using "(not set)" with frequently updated values.
Can anyone tell me the actual reason why this is showing?
After some analysis in our project, it seems like it is because we are trying to log anything other than strings or numbers (in our case boolean).
Based on this view it seems like Firebase only allows Strings or Numbers:
(Adding a new parameter to an event)
It seems, though, as "Numbers" means more than just int, based on this screenshot with double and long:
(Suggestion from Firebase to events to add, and example code)
This is how we do it in the (Android) code:
Android Studio does not complain since its using a regular Bundle which allows to set booleans and other kinds of types.
And this is how it looks in Firebase Analytics:
A simple fix will be to just do:
bundle.putString(YOUR_KEY, String.valueOf(yourBoolean));
A better fix will probably be to make better or more useful tracking events, using strings or numbers.
The Firebase Android SDK for analytics provides a method named setUserId(String id), now i enabled firebase logging and every time i called the method setUserId(1234) i see this in the logs Setting user property (FE): _id, 1234.
My question is how come the Firebase dashboard does not let us filter by this property, there is no property not for userId and not _id, i even tried to add _id as a property in the dashboard but Firebase does not allow property names to start with an underscore.
Do i really have to stop calling that method and just do setUserProperty("userId", 1234) or am i missing something...
I have spent a few hours on this and found the answer i was looking for more or less, hopefully this might save someone else some time.
The only way to filter by Firebase's User Id property is by creating an audience, there you will be able to pick the user id property that is supplied from the setUserId(String id) method.
It is a downer though because you won't see any events for the user/user's you want from before the audience was created.
I was scratching my head with this issue. Initially, I felt so dumb when I could not find how to use user id for filtering in Firebase analytics dashboard that I am setting with official API setUserId(). When I try to look for answer, I realized that I am not the only one. Finally, this is how I was able to filter events based on user id.
In Android Code, I set user id using setUserId() method. When I read bigQuery has this property as user_id, I thought to give it a try by adding a new user property in Firebase Dashboard with the hope that it will fetch the reported id.
And... that worked...Now I can filter new events based on user id.
In audience you have to select contains, exactly match or regular expression for a field.
So to filter for a user you have to add all your users to the audience, which looks cumbersome.
Isn't using setUserProperty is better? Have you faced any problems with using it ?
I have been using Firebase Analytics for quite some time now and I wanted to know if we could add or modify some specific keys (other than userId) in the analytics data visible on BigQuery? The reason I'm asking this is so I can map my old users to the new users on Firebase.
Looking at the analytics data on BigQuery, inside device_info there is a key device_id whose value I always found null. I want to modify this value as I was previously setting it for my old users. This would help migrate users from my old analytics db to Firebase. Not only the device_info, can I modify/add new key-value params in the other dimensions too?
All help is appreciated.
device_id in device_info is only populated on iOS platform with the IDFV, if IDFA is not available. It is not used for the Android platform.
https://support.google.com/firebase/answer/7029846?hl=en
There is no support for overriding these values that I'm aware of.
Meanwhile, if you have access to, say, the resettable_device_id, you might be able to use that to join in other data you have for the old users in BigQuery.