Well met, forum,
I was hoping you could advise me on something.
I am trying to build a customer loyalty module for a Yii2 advanced app. It would log specific user actions on the frontend (such as buying a product, registering, writing a review, etc.) and, after a few checks, reward the user accordingly (with points or badges or some such).
I have finished building the model but I need a way to capture user actions and, after browsing the documentation, behaviors seem the solution. With them I can automatically handle events and send the required information to my module.
Yet sometimes I might need some custom events to happen. My question is: is it possible to make new events part of a behavior or do I need to declare them separately in the class that implements the behavior?
Or maybe you know of a more fitting solution to capturing user actions.
Thanks in advance.