Google Analytics - Tracking a view with multiple custom dimensions values - android

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();

Related

Is it possible to see the events not only in the last 30 minutes in Firebase Analytics?

as you can see in the image Above in the right side, I can see the keywords of search item. but it seems that I can only track the searched keyword only for the last 30 minutes.
Is it possible to see the events not only in the last 30 minutes ? I mean I want to track for example in the last 7 days. how to do that ? I use it on my Android and my iOS app.
According to Firebase (contacted them by email):
Please take note that custom events are not retroactive. This means that data will only start to flow in the reports after you have registered them. You may dive a little deeper into this matter in this article (Firebase - Events), and this article for custom dimensions and metrics ([GA4] Custom dimensions and metrics).
What this means is that there's no ComboBox for selecting the time period on the page on your screenshot.
You have to create custom dimensions and metrics.
Screenshot from one of the above articles:
Screenshot from GA4 - Custom dimensions and metrics
Once Firebase Analytics is initialized, it keeps logging the event of the app which is logged with a bundle. However, it takes sometime for Firebase SDK to send the loggings to the server. As it is stated in your screen shot, it is actually showing the event of last 28 days.
I guess why you are not seeing the events of last 30 min is that Firebase SDK might have not send the logging events to the server yet.
If you are eager to see what's happening you might want to use DEBUG mode

(not set) is showing on Firebase Analytics dashboard

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.

Google analytics custom screen names in Easy Tracker

I have an application with a reused activity (its used for different purposes so just tracking the activity name would not help me, thats why I want to define the screen name manually while still using the EasyTracker. My code looks like this:
EasyTracker t = EasyTracker.getInstance(this);
t.set(Fields.SCREEN_NAME, screenName);
// MapBuilder map = MapBuilder.createAppView();
// map.set(Fields.SCREEN_NAME, screenName);
// t.send(map.build());
t.activityStart(this);
I got these information from https://developers.google.com/analytics/devguides/collection/android/v3/screens
I dont want to do this without the EasyTracker because I didn't find any information what exactly happens in the methods activityStart() and activityStop() of the easy tracker so I cant reproduce this behaviour with a custom tracker and I think the inforation which is collected in the activityStart() method in addition to the screen name is also very usefull. So has someone experience with defining custom values in the easy tracker? Is it a good way to do it this way or is there a better solution?
If anyone comes across the question, the as per the v3 of the Google Analytics SDK,
EasyTracker.getInstance(this).activityStart(SCREEN_NAME); // Add this method.
where SCREEN_NAME is the user defined constant for the reused Activity.
Using custome screen names instead of the default ones i.e the full qualified path name of the Activity
doesn't cause any issues in data collection.
Recommendation, Use Google Tag Manager for your Tracking purpose, it provide you better flexibility like changing the UA property ID in future as well the screen names to be sent to Google Analytics. Read more # Developer Guide For Android

Android google analytics unique visitors

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

Google Analytics Android SDK custom vars not registered/not showing?

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

Categories

Resources