Google Analytics - List event values per event label - android

My current situation:
I might have the complete wrong approach on this, so please tell me if I should do this differently.
I send an event from my Android app to track DB load times.
Event Category: 'DB'
Event Label: 'DBLoadTime'
Event Value: 2356 (Or however long the DB took to load in
milliseconds)
In Analytics I would like to get a table view of all the different load times, listed under each other. From the analytics documentation I could see that they seem to accumulate all the event values as they are received. This means I can only get the total value, or an average value. however, they also use a similar example to what I have, where they use the event value to store 'doanload time' for a video.
My question
Is this at all possible, or are values from similar event labels accumulated by default, and there is no way to get them listed as separate values.
If it is not possible, how can I get this info? Maybe by sending the load time as an event label?
Why I need to know:
Highest value does not really serve me any purpose, as there might be one guy with one really slow device experiencing long load times, where the 2nd longest load time is already half of that.
Average value does not tell me much either, as there are many people trying the app out, with just one or two records in the DB, which will always load fast.

It seems like what you want is a histogram to see the distribution of event values for that eventLabel and eventCategory. We've wanted to see the same sort of thing -- because seeing the actual distribution (or even quartiles) is much more helpful than just seeing a mean and a sum.
Unfortunately (d'oh!) GA currently does not support reporting histograms for eventValue. I've spoken with several of the GA developers about this and no one has said that this is going to happen sometime soon (d'oh!).
Thankfully, we've found a workaround that the GA developers have said is ok -- i.e. not in violation of a terms of service.
Instead of reporting the number of milliseconds that the device took to load, you can include this number as a string in EITHER a custom-dimension, or--in this case-- as the string in eventAction. This will allow you to report how many hits there were of each ms number.
If you are using the GA reporting API -- or the very helpful explorer -- then you can re-bin as you like, from which you can generate histograms to see the distribution.

Related

Good methods to get notified on an android phone if a websites element has a certain value?

I am searching for a method to get notified on my android phone, if the first occurrence of a element of a certain class has a value larger than x on a multiple times a minute updated website.
Though this website is not subject to constant updates, here is an example using amazons "100 Books to Read in a Lifetime":
Currently the first book on the site is sold for $5.99. I would like to be notified on my phone, if it is offered for 5.50 or less. Therefore I would need to implement a method to retrieve the price inside the first occurrence of <span class="a-size-base a-color-price acs_product-price__buying">($5.99</span>), check if the number substring is smaller or equal to 5.5 and notify me on my phone.
Keep in mind, amazon is just an example, I am in search for a general and customizable solution on an often changing website.
What would be a good way of implementing such a notification system?
P.S.: This is my first post on stackoverflow. If you think I should add something or rephrase my question, please let me know!
You can use JSOUP for parsing the html code and then using the selector to get the value of the item, And for the changes in price you have to schedule a job which will run in background and check for updates in a given interval of time, Save the price in device locally on every request and while doing the next request compare the value and if there is any change in value show notification.

Google Directions API returns zero results for TRANSIT, although I am clearly asking for a metro route

This is the call that I make:
https://maps.googleapis.com/maps/api/directions/json?alternatives=true&key=my_key&origin=52.370060,4.925040&destination=52.37913,4.90027&departure_time=1518168706&mode=transit
I This route, which should have atleast 3 metro's and some buses in between them, should find me results.
This is what I send as the departure_time to get that value:
(System.currentTimeMillis() / 1000
And sometimes it works, sometimes no. I tried using the same + 30 (adding 30 seconds to current time) but, again, sometimes I get results, sometimes just ZERO_RESULTS. Why?
I noticed that if I set the time to 5 minutes in the past, it works. but I need it to start at this moment. This makes no sense, why would the call return me results for the past, but not future, for planning
I am afraid your questions is a bit broad since the understanding of how google works internally is a mistery for most mortals, but there is a few cases where you can have zero_results.
The first one is that you use times that are already in the pasts. so always make sure the epoch time you use has not already passed.
Another could be that in the moment you requested the directions, there are no posible routes for your desire destinations, since google collects data from other sources like Live Traffic(for driving), etc.
What I found is that if this issue persist (that you keep getting zero_results) for a specific directions could be actually a Bug of the API, and you can report it in the issue tracker https://issuetracker.google.com/ since I found reported/accepted Bugs (like https://issuetracker.google.com/issues/63884989) related with your issue.
If I found more info I will update this answer.

Is it possible to get total online hours of the users by using mixpanel in iOS and android

In mixpanel is it possible to track then total number of hours my application used per day. I am having Shift in and Shift out option in my application but what i need is to track the Consolidated
time of my application usage per day.
In theory yes, but it very much depends on the events you have.
If for example you have a beginSession and an endSession event tracked every time the users opens and closes the app, respectively, you can simply find all of a user's events of these kind and compute the "live time" between them.
Mixpanel have a new(ish) application in their we console for running map-reduce style JQL queries on your data set, you could script something like this. Or if you prefer, you can plug into their export API and pull all your events for a users, and run the calculations. If you have lots of events you could even try to heuristically determine "active time" based on idle time between events?
However, I believe you are more likely asking if this is something that Mixpanel tracks for you and will give you for free, I do not believe this is the case.
If you have a rundown of your tracking structure, I may be able to provide more specific advise?

Android - Implementing a means to get 'real' time in offline apps

Background
The company I work for is creating an app that collects information from various device events and sensor data.
One of the things we would like to be able to do is use time to process the data when it gets to the server.
We would also like there to be an acceptable amount of "offline time" allowed, i.e., the app could be used for its purpose even while offline until the next server data update is required etc.
Problem
One issue is that the user can just change the device time.
We overlooked this, and have been able to successfully generate events for the previous day, which would mean that our app could be fooled in situations where device time is a factor, which is very uncomfortable.
Imagined solutions
Obviously I can ensure that the app is always sync'd to the server before it starts collecting important data, and then use server time and make all further time relative to that.
Another way might be to keep a reference to something like the last update time or even the app install time and work out time relative to that.
Questions
How do people get around this typically?
Are there any libraries out there that can be used to enforce real device time?
Thanks guys

Android: real-time friend list update

I just made an app where a friend list is being updated in real time depending on if you get blocked or deleted by one of your friends, so I refresh the list on the screen. However, I was wondering what would be appropriate as the time interval for updates using threads? right now I am using 1 second but I think it's a bit exaggerated.
I would have it as user defined. If you set a default time that is unchangeable, some users may think it is running the thread too often. They may also think your app is causing bad battery life. Just have a few options like Twitter or Facebook. Something like 1,5,10,30,60,180,etc.

Categories

Resources