Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't track events from selected users

  • Loading branch information...
commit 6dc86efa754b50974b8a42ae37cfcfee1adf68e6 1 parent c49837d
Ricardo Panaggio authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  app/controllers/application_controller.rb
View
3  app/controllers/application_controller.rb
@@ -65,7 +65,8 @@ def check_agreement_to_tos
def track_event(event, properties = {})
user_id = current_user ? current_user.id : properties.delete(:user_id)
- unless (user = User.find_by_id(user_id)) && user.admin?
+ if (user = User.find_by_id(user_id)) &&
+ !AppConfig.untrackable_user_emails.include?(user.email)
Tracking::EventTracker.delay.track_event([event,
user_id,
request.ip,
Please sign in to comment.
Something went wrong with that request. Please try again.