Closed Govinda-Fichtner closed 11 years ago
This would be really helpful for me. Here's a concrete example: I have a Subscription model, and I create it based on an opt-in box on my registration page. But I'm using omniauth-identity to create the account, and so there's no controller for me, and I redirect to another page on success, so it is really hard for me to track this event the standard way. I'd like to track the event in an after_create hook, rather than the controller.
I understand your need for this. I've felt the same in the past. However, at this point, I think it's out of the scope of this project. Analytical focuses on client-side javascript interaction exclusively, and it would be a big change in scope to add backend or email support at the moment.
I'm going to close this for now, and we can revisit it if need be in the future. Regardless, thanks for the suggestion! :+1:
It would be nice if analytical could be used from mailers and models in the same way as from controllers and views, too. Update: OK, after studying the code of the analytical gem I realized that all the tracking commands are called via javascript on the client side. Even for tracking commands in the controllers... But even so I feel that it would be possible to make it work for models and mailer by using a library like http_party and a queue to make calls from the server side. Would be interesting to know what others think about this....