lib/mixpanel/middleware.rb in mixpanel-4.0.2 vs lib/mixpanel/middleware.rb in mixpanel-4.0.3

- old
+ new

@@ -87,10 +87,10 @@ def is_javascript_response? @headers["Content-Type"].include?("text/javascript") if @headers.has_key?("Content-Type") end def is_trackable_response? - return false if @status == 302 + return false if (300..399).include?(@status.to_i) return false if @env.has_key?("HTTP_SKIP_MIXPANEL_MIDDLEWARE") is_html_response? || is_javascript_response? end def render_mixpanel_scripts