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.
Related
I'm building an Android app which syncs data to Google Fit and uses the Google Fit SDK to achieve that - but I'm pretty sure my question also applies when you are using the REST API.
Within my app users can also change data inserted to Google Fit. The Google Fit SDK has two distinct functions to handle those kind of things: insertData() and updateData().
Now, I don't want to keep track of whether a user changed an already synced data point vs whether it is an entirely new datapoint. I just want to have a simple Boolean flag which indicates whether a data point has already been uploaded to Google Fit or not - that's to keep things simple and reliable on the app's side.
So when a user creates a new data point in my app, I set a syncedToGoogleFit flag for that data point in my DB to 0. When the data point has been synced to Google Fit I set it to 1. When the user later changes the data point in my app I set it to 0 again and so on.
However, the Google Fit SDK distinguishes between inserting and updating which means a simple Boolean wouldn't be enough to track changes on my end as insertData() will fail if there already is a data point for a given timestamp. Is it possible to always call updateData() even if I am actually inserting new data and that way get by with just the Boolean flag on my end?
Looking at the documentation it should be okay, but I would feel safer if someone could confirm that. Also I'd like to know whether there are any potential performance implications of the approach outlined above, but I guess this is just something the SDK devs can answer.
I've played around quite a bit with the SDK now and from what I am seeing I can say, that using updateData() seems to work just fine.
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'm trying to add more data to my Google Analytics report regarding the use of my Android app.
I started using custom dimensions since yesterday and didn't get any results yet and I want to make sure I'm doing it right.
I want to tie a page view with additional information to be sent with it, and that's why I'm using custom dimensions. In the onCreate method of a specific activity I'm doing this -
Tracker tracker = EasyTracker.getTracker();
tracker.setCustomDimension(1, 128));
tracker.setCustomDimension(2, 2));
tracker.setCustomDimension(3, 45));
EasyTracker.getTracker().trackView();
I've set my custom report to work by the Screen Views metric, and by one of the dimension Id's from above.
Will all of this data be sent along with the trackView command? Because I still can't see any data from yesterday.
Thanks!
It works. This time I needed to wait about 2 days for the data to appear.
Now I need to figure out how to show the data from all these dimensions at once, but I guess this fits another question.
I don't have any experience with GA tracking using the android sdk api but I did find this page in the GA documentation. In the code examples they use the following as the trigger:
tracker.sendView();
I'm using Google Analytics SDK to collect statistics from my Android application. I want to be able to create a chart showing which language are users using.
To do so, I'm creating a visitor scope custom variable like this:
tracker.setCustomVar(1, "Language", language, 1);
The problem is I'm afraid that this approach isn't correct. I want to create a pie chart in Home -> Dashboards in google analytics, so I choose Add widget -> Pie -> "Unique Visitors" grouped by "Custom Variable (Value 01)".
Pie chart created like above shows invalid results. The goal is to get last variable value for each user and then display the number of users for each value. What it actually does is it takes all variable values and for each value it shows the number of visitors that ever had this value.
This means that if someone switched between languages, he will appear in both languages in the chart. Not the one that he is actually using.
So my question is - how to do it correctly? Should I change something in the code, perhaps use something other than variables? Or maybe it's possible to fix it just via google analytics website?
Thanks
There's no way to achieve what you want.
If the same visitor changes it's language it will have that language from now on, but he'll still show up as the old value on the days before. It happens because in GA history is never rewritten, data is processed by session(visit) and the data that goes in is static and can't be removed or changed. If the visitor was reported only on the new value it means that the visits before would have been changed. This is just against the design.
You may find other ways to remedy that and understand better people that are changing their languages on the application. You may fire an event when Language is changed for example and understand the impact of new languages being added to your application.
There's only one place in GA where you have a better view on multiple sessions. and that's the multichannel funnels, but they only work for Goal Completions reporting on different Traffic Sources. The reports you see there are processed by a separate system inside Google Analytics and can break some of the rules about how Google Analytics processes and stores data. Because of that they can tie the visit back together and understand the progression of changes that happend on the traffic sources dimension and lead to a goal completion.
I'm sorry it doesn't solve your problem. But unfortunately it's just not possible by design.
You don't need to set the user's language yourself, go to your Google Analytics webpage > Audience > Demographics > Language.
This will show you everything you need to know about your users' selected languages.
EDIT:
For a custom app value (like a setting value), in my experience the best approach is to set up a daily/weekly ping of that value as an event, so you'll get a daily pie chart of all your active users selected language.
you can set up such a ping using the AlarmManager
So I'm still mucking around with this Google Analytics SDK. According to this, I should be able to send custom vars with a visitor scope that include the app version, and the phone model.
Using tracker.getVisitorCustomVar(i) I can see that the information is indeed stored, and the log shows NetWorkRequestUtil/ConstructPageviewRequestPath with a message that contains the custom vars.
But it does not show up in the analytics report along with the other tracking information. I thought I would find it under Visitors->Custom Variables, but that only says
There is no data for this view.
Where can I see the custom variables? :(
How long ago did you incorporate the custom vars? Analytics is not realtime, there can be an --i think-- 24 hour gap?
I'm doing this, and it works for me. I'm assuming you do get other data, so your initialisation and 'dispatching' of the tracker is correct?
You can set your customvar like so (as I imagine you are doing allready).
tracker.setCustomVar(TRACK_SLOT_AUTH, TRACK_CVAR_AUTH, isAuth, TRACK_SCOPE_SESSION);
(using global vars to be sure not to override already used slots here, but the intention should be clear)
The data shows up under Visitors->Custom Variables
Custom variables have been replaced by Custom Dimensions and Metrics.
https://developers.google.com/analytics/devguides/collection/android/v2/migration#update-methods