How to increase value by a number every time a user logs in

Hi friends,

I’m developing an app that rewards user by a bonus amount every time a user logs into his/account.
For example, a user logs in, his account reads a bonus of $0.1, next time, another $0.1 is added to the balance. Every time user logs in, $0.1 is earned!

What condition do i apply to achieve this?

Your contributions are greatly appreciated.

You can put it into the login workflow, as a step before you (for example) redirect the user to their “home” page.

Might want to put a condition on it so it only fires if they haven’t logged in for a while, otherwise they will be logging in and out all day :slight_smile:

1 Like

Thanks for your prompt reply @NigelG

The business model is a kind of lottery where 1 user’s email is picked randomly as a winner of the day to win for example $100.
Every user is required to login everyday to check whether he has won or not. So for login in, you get a bonus of $0.1 BUT the bonus can not be redeemed until you win and the bonus you’ve generated over time will be added to the won amount.

Revenue generating model is based on Ads so I required as many page views as possible.

The more they log in and out, the merrier however, the user won’t redeem his bonus until he wins and the accumulated bonus will be added to the won amount.

You understand.

So i want it such that the bonus will be accumulating in the header bar as seen in the image attached.

Thanks for help me out

Play with the following:

You can implement this in a variety of ways depending on your setup, but this is how you can increase a value by a set value based on certain conditions.

1 Like

I appreciate your prompt reply @vincent56

Please which element do i implement this workflow.

Let me explain how I set up the system.

User signs up - he gets $0.1 as bonus which will be displayed on the header of his account

As shown below…The user is logged in in the image below.

If the user logs out and logs in again, the value of the bonus increases by $0.1 added up.

So that’s it.

Mind you, where the arrow is pointing to is Text element which will hold the value

So I don’t know which of the element to implement your workflow above.

Thanks again

Well this could be a tricky thing because of the monetary reward. I’m not sure you want this to fire each time a user logs in because you’ll have users just logging in and out endlessly if they think it’s worth it as Nigel mentioned.

So maybe you can think of a more secure way to add a bonus? Maybe it should be more connected to actions on your site? Do X, get +0.1, do Y, get +0.1.

Also, with logging in and out, you do not create a great user experience as you are forcing people to log in and out each time they visit your site.

But as outlined above, if you want to move ahead with this you can just add this as a step to the login workflow. The condition for looking at when the last login was will require another field on the user ‘Last Login’. You can add a condition to look for users with a last login between certain dates.

If this is all very new to you, I suggest browsing the forum and Bubble reference for this as it is all clearly outlined in other topics.

Good luck!

OK noted. Thank you very much.

I will do as you said.

Thanks a lot

This topic was automatically closed after 70 days. New replies are no longer allowed.