How to differentiate active users from non active ones - firebase

I built an app and I would like to differentiate the behaviours of my users regarding their activity levels.
Objectives : make monthly users become daily users by understanding how daily users use the app vs monthly users and trying to narrow the gap between them.
I am well aware of the Daily / Weekly / Monthly active users Firebase offer but it is still a snapshot at a specific time.
Basically, if someone open a session at least one time during 20 days / month => highly active users, if someone opens it at between 7-20 times a month => medium active user, if someone opens it less than 7 times => low active users.
Do you have any clue on how to split these to then understand their behaviour?

because you are tagging your question firebase database that means you want to do it programmatically.
you can make a field in user node name it counter and every time the user login to the app you just increment the counter and make a query to bring the count that's it.

Related

Create a trial account for new users to test a web app build with Firebase: How should I count a trial period?

Product: Web App.
Technologies: Firebase, JavaScript, Cloud Functions.
Hello I am dealing with the task of creating a trial account for new users in order of testing an app to know if it fits theirs requirements.Then, within trial time, users can decide if they want to suscribe or not.
This is my initial idea:
A potential new user discovers the landing page of the app
The user is interested in the app and creates a new account
The new account has a trial period (15 days free)
Whithin this trial period the user has to subscribe (Stripe) or the account is disabled/removed
I know that Stripe can deal with trial periods, but you first have to fill the payment data (credit card, etc). I want to avoid this, so I want to control the trial time and let the user try the app without asking him for payment data.
My cuestion is that after creating the user account, in which way could I count the trial period ?
Do I have to use Cloud Functions to count the trial period? Any orientation about how to count the trial period with Cloud Functions? Do I have to check the new accounts every day or something like that or is there any other way to get a notice after the trial period is over?
Any other approches?
Thanks!
My cuestion is that after creating the user account, in which way could I count the trial period ?
When the user creates an account, store a timestamp of creation date for your document. When the user logs in, check if this timeStamp has passed 15 days or not.
You can also capture the time of creating the account in your app, add to it 15 days in the future, and then save this new [expiry date] in your user account info document.
Whenever this user logs in, first check, if the expiry date is before\after the current date. If it's after the current date(time of login), do your logic and tell them that the trial period is over.

Making a leaderboard with Firebase Realtime database and Unity

I am making a leaderboard by using firebase realtime database, unity and facebook ( for profile pic and name )
But I am struggling, I am not sure about the way of doing that. I want to display multiple leaderboards -> All time WORLD / REGION / FRIENDS score, monthly WORLD / REGION / FRIENDS and weekly one.
I know I can use cloud functions to reset weekly and monthly leaderboards.
But how can I store world and region scores ?
Now I just have this ->
https://cdn.discordapp.com/attachments/440873502535450627/821361474353889320/ld.JPG
Thanks to that, I can easily get region leaderboards getref.getchild users . getchild france and then orderbyvalue . limittolast ! this is good !
The problem is how could I get world leaderboard ? ( I have other countries ) I am so lost...Do I need to make another structure for my leaderboard ?
There are a number of considerations that you might put into this including pricing, how much you trust the client, &c. Generally, with a NoSQL database like Realtime Database, you might have a lot of redundant data to make up for the fact that your ability to query is limited. It's also really easy to pull in a lot of data by mistake, so you'll see a number of best practices around keeping your database shallow.
With that said, I think I might recommend reorganizing your data a little bit. For example:
Have one node named "users" with all of your users in there. Each "user" in users should be placed in a node that's simply the userid (which makes security rules easier to write), and here you can place the all time score, monthly score, and weekly score. I'd also recommend storing the time you got that score (using ServerValue.Timestamp) so you don't have to worry about going through your users and deleting all the old scores. If your weekly timestamp isn't this week, you know to ignore/overwrite it (obviously, time is hard, so you'll have to work out what a "week" means to players of your game wrt time zones &c).
I'd also put an array of all a user's "friends" under this user node by their user id. That way, when you go to look up friends, you just just ask for "users/" explicitly there.
Now for regional and world leaderboards on monthly and weekly cadences, I'd just copy everything you want to display into that leaderboard node (say username and score) and add the uid if you need to attribute it back to a user (say if you want to click on that score and see their all time record). So if a user lives in France and they get a weekly high score for them, I'd first write that user's "users/" node with the weekly score and timestamp, then I'd go out to the weekly leaderboard for France and add the new score if it qualifies (ie: don't add it if you're only tracking the top 10), then go out to the world leaderboard and add it there.
How you do this copying is up to you. You could make it the client's responsibility with security rules just making sure they're well behaved - which would probably be fast and cheap but might get weird if they go offline partway through updating. You could use a Firebase trigger that would listen for a user updating their node and copy the data out to the respective leaderboards (this would be more expensive since you're paying for Cloud Functions time and a bit slower but will always work once the user node is updated).
A final note is that for, say, weekly leaderboards. I'd have a node that says "this is France's weekly leaderboard right now" and have all clients read that first before figuring out where to write. That way, at a time you decide for when the week turns over, you can change that node and just have people start writing somewhere else. You can then keep the old leaderboard up for some time (ex: maybe you want to see who changed between this week and last), and you can delete it at your leisure after you're sure that all players have their score in (ex: over slow internets, disconnects, &c).

How to create a Firebase Audience to ask for an App Store Review/Rating

I want to create a Firebase Audience to ask to rate/review my app.
The condition I would like to have for a user to fit into the above audience is: a user who has opened the app at least 10 times, over the course of 3 distinct days.
Is it possible to create an audience with this condition?
I am open to suggestions to change/improve the condition. Or even a completely different condition that will achieve the same goal.
You can create a custom audience, choose events as condition and pick session_start.
Than you can choose additional options like the number of session and period.
This does not guarantee you 3 distinct days though. But by default Firebase will only count a new session every 30min. So most of those users have had their session over 3 days anyways. Firebase also gives you a preview of the audience size. So you can easily check how many users would be in that audience with a period of e.g. one day.
In general i would recommend asking users for rating who had a positive experience within your app. Completing certain action etc. and use that event for the audience.

What's Google Analytics user/active user/new user/define?

I have a question regarding the active users definition in the active users report.
According to the official explanation (https://support.google.com/analytics/answer/6171863?hl=en)
1-Day Active Users: the number of unique users who initiated sessions on your site or app on January 30 (the last day of your date range).
7-Day Active Users: the number of unique users who initiated sessions on your site or app from January 24 through January 30 (the last 7 days of your date range).
Can I interpret sessions here as "at least one session"(one or above)? If so, the 7-Day Active Users can be users who only viewed one session during the last 7 days. How can this metric indicate the "returning users"?
Should I sessions as " more than one" (two or above), which seems to make more sense?
Another question: As 7-Day Active Users counts into the active users from the last 7 days (including today), so it should include all 1-Day Active Users . By the same logic, the 14-Day Active Users should include all 7-Day Active Users, and the 30-Day Active Users should include all 14-Day Active Users. Am I correct?
If I am correct, then it will never happens that 1-Day Active Users are more than 7/14/30-Day Active Users.
What does the below sentence from the explanation page mean?
"In cases where you have a lot of 1-Day Active Users but the numbers drop off for longer term users"
Does it mean that 1-Day Active Users stabilizes/increases while the long term users decrease? So it's about comparing the trend, not the absolute active user number?
Users reports are bit tricky to understand in GA, basically it depends on the date range you are selecting.
Q1: GA considers a user as active if he had at least one session for that day irrespective of whether the user is new or returning or he had more than a single session.
Q2: No, all 1-Day Active Users are not included in 7-Day Active Users. For example a user had a session today and also on the 7th day then he'll be counted only once because in the selected date range at least one session is only considered.

Firebase Analytics User time for performing actions

I would like to measure how long (on average) users are performing certain actions in my app. For example, the time it takes for a user to add an item to the cart till the time to purchase the items. Can Firebase analytics track these time differences? If so, how can I get a report out of it or add it to my dashboard.
I know this can be done using traces in Performance monitoring, but I want to know these time differences not to troubleshoot performance issues but rather behavioral issues for my users.

Resources