ankane / ahoy

Simple, powerful, first-party analytics for Rails
MIT License
4.23k stars 377 forks source link

Call `ahoy.reset` during Warden `before_logout` hook #547

Open seanpdoyle opened 10 months ago

seanpdoyle commented 10 months ago

In addition to the after_set_user hook, the Warden::Manager also supports a before_logout hook.

This commit integrates with that hook to call ahoy.reset so that subsequent visits will be anonymous, and subsequent authenticated sessions will create a new Visit.