This is the mechanism behind slot machines.
Research:
Incorporating the variable-ratio schedule can increase ongoing loyalty program usage by 33%. Loyalty programs should be a combination of a fixed interval schedule, a guaranteed reward each time an action is completed. This can be done by offering random exclusive bonuses or promotions or gamification.