Coupon code system

A few other questions that would help in determining a good way to do that are:
Are you tracking user info on Firebase as well?
Are the users only allowed to use each coupon once?
Is “newuser” only available for a limited time after sign up?

All those questions (and probably more) would need to be considered in designing the system you are trying to impliment.