lib/landable/traffic.rb in landable-1.10.0.rc1 vs lib/landable/traffic.rb in landable-1.10.0.rc2
- old
+ new
@@ -7,11 +7,11 @@
require 'landable/traffic/noop_tracker'
module Landable
module Traffic
def track_with_landable!
- yield and return if request.headers["DNT"]
+ yield and return if (request.headers["DNT"] || untracked_path)
begin
@tracker = Tracker.for self
@tracker.track
rescue => e
Rails.logger.error e
@@ -28,8 +28,12 @@
Rails.logger.error e
if respond_to? :newrelic_notice_error
newrelic_notice_error e
end
end
+ end
+
+ def untracked_path
+ Landable.configuration.untracked_paths.include? request.fullpath
end
end
end