I understand how Firebase Analytics counts session duration if application in foreground, but what if my application gives some services to user (playing mp3) which I want to count as a session ? Is it counting background activity by default or I should add something to code ?
Thanks!
Analytics is looking at the time the user spends in your app, which means that (for Android) an Activity is visible on screen. Anything happening in a service or in the background does not count as usage.
If you want to record time spent playing music, you can create your own custom events to track that, then export your data to BigQuery to derive a summary of that behavior.
Related
I am developing android application on which peoples donate food etc and when they submit their donations i want to start timer about 30 to 50 minutes in background even they close the application. Timer continuously run in background and if any user open the app it shows the remaining time also according to background progress.
I want to use background service which count time but if any user submitted multiple orders then how it works and also I want to change time duration through firebase. Background time is running and if we decide to increase time then we increase it through firebase and changes also takes place in app background service.
What are they ways I used to implement this kind functionality.
Do you want any notification from background ? If not, you don't need a background service just to display remaining time.
All you have to do is :
save the time of the last donation in SharedPreferences for example or in Database
every time the app is opened
check the duration with Firebase
launch a CountDown timer to display remaining time
I think it will do the job.
I'm trying to prevent creating new session, while firing a Google Analytics event, when app is in Background (or killed state). Events like "PushNotificationReceived" need to be fired when app is not opened (or in background). But these events would increase session count.
Though it is possible to make user segment and filter out these sessions in Google Analytics Dashboard. But I'm looking for alternate way.
What should be the best approach to track these type of events without impacting session count or active users, etc.
The whole idea of Google Analytics events is that they supposed to be part of a session so there is no obvious way to set a tracking like that.
Like google analytics has setSessionimeout where all the vents are grouped together and at the end events are dispatched.Is there anything similar for Flurry analytics,As flurry hits the flurry server instantly,I want it to bunch together all the events in a session (Suppose of 30 min ) and then disptach them.
It is not possible to force the Flurry SDK to report analytics session data at specified time. A Flurry session is defined by
"If the app pauses or moves to the background for more than 10 seconds, the next time the app runs, Flurry agent will automatically create a new session and end the previous session. Otherwise, Flurry agent will continue the same session. This can be updated via the setSessionContinueSeconds method. If the app is terminated, a new session will be created when the app runs again."
The only way to control the session reporting is through the app lifecycle. But generally I would expect all of the events to be reported in a single batch per session. You can observe this behavior by watching the event log in the Flurry UI as the app is closed and/or reopened.
setSessionContinueSeconds is really only useful for cases where you would want the Flurry session to continue for longer than 10 seconds while the app is in the background. For instance an app that plays music in the background.
Is there a way to tell Google Analytics that certain events shouldn't be counted towards session data?
Specifics: I have an Android app that uses Google Analytics. It has a service that crunches some data in the background, and reports stats on those tasks to GA. (The background tasks happen while the app is inactive). It seems that sending data this way is creating a ton of spurious sessions in GA, since it thinks that the events mean that the user is using the app and thus is initiating a new session.
How can I say to GA, "hey I'm sending you this event, but don't count it as a session"?
You should take a look at the non-interaction event flag. I'm not sure if it will do exactly what you're looking for (it's effect on bounce rate is all that's documented), but it's the closest thing I'm aware of to what you're describing.
For the last couple of days i'm stuck with what i call, overthinking :
FireBase is dedicated to be a "Real Time" communication platform. I'm trying to understand what is the right approach for the follow up situation.
In my PVP game, two users suppose to start the game at the same time. I'm already making a "pre check" to make this two events as close as possible(promote both of the users to click a button, observe specific value change, and only than start).
Yet, both of them starting with a small delay of 1-2 sec.
Even tho FireBase suppose to act as a "Real Time" platform, should i assume(/code) within this perspective? Or should i assume Delay is going to be a common issue?
2. Is there an avg delay/time, assuming FireBase works as he should and my code is efficient, for each listenValue "call"?
UPDATE
NOTE* Each user "listen" to the other device "ready" state, so when the "last" device click ready, the game will automatically start
Since as there is a small delay between player sync. Which I think I because when you attach your second player to the game it triggers must be starting the game as soon as second player is registered. I think you need a small delay between adding your second player to the game and starting the game. Posting some code might help a little more to understand the exact problem.