Increasing a streak only once per day

Right now, in my app, I have it so that a streak increases every time a user completes a challenge. I want it so that a user’s streak increases everyday as long as they complete at least one challenge per day. Also, how would I reset the streak if the user does not complete a challenge within said timeline? Please help! Thank you!

Hi @Beginner,

Welcome to the forum!
These forum posts may be useful for you:

Best,
Victor.

2 Likes

Hi @Victor ,

it seems still not to be working. I think it has something to do with my logic.

Right now my logic is for increasing streak:

Create an action for update user

User streak count +1

Last Completed Date: current time

Streak expiration: 2 days from now

When does this happen:

Sometimes

Happens if logged in user> last completed date is before Start of today.

Also, would this logic work for users who have never completed a challenge before?

Thank you!

@Beginner

Let’s examine your conditional: if logged in user> last completed date is before Start of today.

Let’s imagine user does the action to increase the streak count today, 04/11/2025. You record last completed date as 04/11/2025.
This user opens the app on the next day, 05/11/2025. Will the conditional work? Yes, as 04/11/2025 is before start of day 05/11/2025.
Let’s imagine this user opens the app on 20/11/2025 instead. Will the conditional work? Yes, as 04/11/2025 is before start of day 20/11/2025.

It’s better to set the streak expiration to future, and compare with it. If the expiration is after start of today - then streak continues. But if it is before - then you zero it out.

Note that you need to keep in mind the timezones and winter/summer times for start of today, dates, datetimes. But this is a different story. Time questions were discussed extensively on the forum, I would advice to do some research.

Best,
Victor.