mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: page view stats for mobile view
This commit is contained in:
@@ -21,8 +21,10 @@ class Middleware::RequestTracker
|
||||
ApplicationRequest.increment!(:page_view_crawler)
|
||||
elsif data[:has_auth_cookie]
|
||||
ApplicationRequest.increment!(:page_view_logged_in)
|
||||
ApplicationRequest.increment!(:page_view_logged_in_mobile) if data[:is_mobile]
|
||||
else
|
||||
ApplicationRequest.increment!(:page_view_anon)
|
||||
ApplicationRequest.increment!(:page_view_anon_mobile) if data[:is_mobile]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -62,6 +64,7 @@ class Middleware::RequestTracker
|
||||
is_crawler: helper.is_crawler?,
|
||||
has_auth_cookie: helper.has_auth_cookie?,
|
||||
is_background: request.path =~ /^\/message-bus\// || request.path == /\/topics\/timings/,
|
||||
is_mobile: helper.is_mobile?,
|
||||
track_view: track_view
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user