From 8af84f7de28a9f73e8b6fb23dd97c1c4e177bb3c Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Mon, 2 Apr 2018 20:34:12 -0400 Subject: [PATCH] Make Ahoy visit duration match session timeout **Why**: So that Ahoy's `visit_id` can be used to track a user's events within a particular session. --- config/initializers/ahoy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/ahoy.rb b/config/initializers/ahoy.rb index 88bbf118106..6bf4544d0b6 100644 --- a/config/initializers/ahoy.rb +++ b/config/initializers/ahoy.rb @@ -1,7 +1,7 @@ Ahoy.mount = false Ahoy.throttle = false # Period of inactivity before a new visit is created -Ahoy.visit_duration = 30.minutes +Ahoy.visit_duration = Figaro.env.session_timeout_in_minutes.to_i.minutes module Ahoy class Store < Ahoy::Stores::LogStore