-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to trigger ahoy.track from a model ? #460
Comments
Hey @leoplct, Ahoy doesn't have an official method to access the |
Cleaning up issues |
Just added an official method for this on master - after_create do
ahoy = Ahoy.instance
ahoy.track("User Sign up", user_id: id) if ahoy
end |
Thank you. I have updated to last version and run it from console but I got nil.
|
I have meet the same issue, and fixed like this: add a new method to module Ahoy, it create a fake visit and track events
and call it anywhere
|
Hi,
I have to trigger the event ahoy.track 'User Sign up' in the User.after_create callback.
I want to avoid to call it in a controller (eg. thank you page).
Error: ahoy is not defined.
The text was updated successfully, but these errors were encountered: