Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use analytical in mailers or models #40

Closed
Govinda-Fichtner opened this Issue · 2 comments

3 participants

Govinda Fichtner Matt Van Horn Sathya Sekaran
Govinda Fichtner

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....

Matt Van Horn

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.

Sathya Sekaran
Collaborator

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:

Sathya Sekaran sfsekaran closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.