Retention curve - how to measure with resurrected customers? - analytics

I am trying to plot a retention curve for a SaaS. I am dividing the users in cohorts of activation (eg. users who activated in 10/2021, in 12/2021, ...) and analyzing whether they renewed their subscription or not on every renewal cycle. One example is the chart below (numbers are fake):
Cohorts of retention for a 3 months plan
The problem is:
Let`s say a user subscribed in 2021-01; renewed on time in 2021-04, that is cycle 1, 3 months. Then they cancelled in 2021-05 and reactivated their account on 2022-01 and renewed again in 2022-04.
On which cohort should this user be considered? Only 2021-01 or both 2021-01 and 2022-01? And do I consider their first renewal cycle in 2021-04 or 2022-04?
I was thinking of only considering 2021-01, so I could see a "smilling" curve for that cohort on the reactivation, but the problem is I will also be considering 2022-04 as their 3rd cycle (9 months) which is wrong.

Related

Add predictor to model quantile function in Tableau

Does anyone know how to get a model quantile function to project into future using a predictor variable/measure? I have support ticket volume I'm trying to predict using previous months and another measure.
MODEL_QUANTILE(0.5,SUM(Volume),ATTR(DATETRUNC('month',[fiscal date])),SUM(Time / User (min)]))
If I take out the last predictor (Time/User) it produces a smooth curve into future, but only gives me until this month if I have it in. Both measures stop at this month, and I've tried "Infer Properties from Missing Values" and "Extend Date Range"

Firebase Firestore Stock Count updating?

I am using firebase purely to integrate a simple ticket buying system.
I would think this is a very common scenario people have and wondering what the solutions are.
I have an issue with the write limit time, it means I can't keep the stock count updated.
Due to Firebase's 1 second write limit and the way transactions work, they keep timing out when there is a large buy of tickets at one point in time.
For example:
Let's say we have a simple ticket document like this
{
name: "Taylor Bieber Concert"
stock: 100
price: 1000
}
I use a firebase transaction server side that does (pseudo)
transaction{
ticket = t.get(ticketRef).data() //get the data of ticketRef doc
guard (ticket .stock > 0) else return //check the stock is more than 0
t.update(ticketRef, {stock : increment(-1) }) //update the document and remove 1 stock value
}
The transaction and functionality all works however if I get 20-100 people trying to buy a ticket as it releases, it goes into contention it seems and times out a bunch of the requests...
Is there a way to avoid these timeouts? Some sort of queue or something?
I have tried using Transactions server-side in firebase functions to update the stock value, when many people try to purchase the product simultaneously it leads to majority of the transactions being locked out / Aborted Code 10

Based on Gatling report, how to make sure 100 requests are processed in less than 1 second

how can I check my requirement of 100 requests are processed in less than 1 second in my gatling3 report. I ran this using jenkins.
my simulation looks like as below
rampConcurrentUsers(1) to (100) during (161 second),
constantConcurrentUsers(100) during (1 minute)
Below is my response time percentile graph of two executions for an interval of one second.
enter image []1 here
What does the min,max here will tell us, i am assuming the percentages 25%-99% are the completion of the request.
Those graph sections are not what you're after - they show the distribution of response times and the number of active users.
So min is the fastest response time
max is the longest
95% is the response time for which 95% of your requests were under
and so on...
So what you could do is look at the section of your graph corresponding to the 100 constant concurrent users injection stage. In this part you would require that the max response time always be under 1 second
(Note: there's something odd with your 2nd report - I assume it didn't come from running the stated injection profile as it has more than 100 concurrent users active)

Why is my Google Cloud SQL instance being billed every hour?

It seems like I'm being overbilled but I want to make sure I am not misunderstanding how Per Use billing works. Here are the details:
I'm running a small test PHP application on Google App Engine with no visitors other than myself every once in a while.
I periodically reset the database via cron: originally every hour, then every 3 hours last month, now every 6 hours.
Pricing plan: Per Use
Storage Used: 0.1% of 250 GB
Type: First Generation
IPv4 address: None
File system replication: Synchronous
Tier: D0
Activation Policy: On demand
Here's the billing through the first 16 days of this months:
Google SQL Service D0 usage - hour 383 hour(s) $9.57
16 days * 24 hours = 384 hours * $.025 = $9.60 . So it appears I've been charged every hour this month. This also happened last month.
I understand that I am charged the full hour for every part of an hour that the SQL instance is active.
Still, with the minimal app usage and the database reset 4 times a day, I would expect the charges (even allowing for a couple extra hours of usage each day) to be closer to:
16 days * 6 hours = 80 hours * $.025 = $2.40.
Any explanation for the discrepency?
The logs are the source of truth usually. Check them to see if you are being visited by an aggressive crawler, a stuck task that keeps retrying etc.
Or you may have a cron job that is running and performing work. You can view that in the "task queue/cron jobs" section in the control panel.
You might be have assigned an Ipv4 address to your instance and Google Developer Console clearly states
You will be charged $0.01 each hour the instance is inactive and has an IPv4 address assigned.
This might be the reason of your extra bill.

Forecast on payments for 5 Years

I've been given the task of creating a data extract that shows how much money an account will make over the next five years(monthly) based on its current rate of payment.
So using 1 example account that pays £1000 a month, which owes £12,000 overall, I can predict we will get £1000 a month and that in 12 months the payment will be settled and every month from then would carry a zero.
I can't work out how to create an SQL query that gives me that, it needs to look at the balance and last payment received, then create a payment for each future month until that balance is zero.
I think I may be over complicating it, All I have managed to come up with so far is some code that tells me how many months it would take to clear based on the last payment which is basically just a balance divided payment. So as it is I have created a query that gets, last payment, number of months till its paid. What I need to do is get it to use the count of months till paid to create future months?
Desired output:
Month|Payment
Jun-14|£1000.00
Jul-14|£1000.00
Aug-14|£1000.00
Sep-14|£1000.00
Oct-14|£1000.00
Nov-14|£1000.00
Dec-14|£1000.00
Jan-15|£1000.00
Feb-15|£1000.00
Mar-15|£1000.00
Apr-15|£1000.00
May-15|£1000.00
Jun-15|£0.00
Jul-15|£0.00
Aug-15|£0.00
Sep-15|£0.00
Oct-15|£0.00
Nov-15|£0.00
Dec-15|£0.00
Jan-16|£0.00
Feb-16|£0.00
Mar-16|£0.00

Resources