Permalink
Browse files

Small fix to the NPS number, which wasn't properly counting only sign…

…atures that created a member.
  • Loading branch information...
1 parent 732cc71 commit f94245cf2c4c90465368ca1393e8ebf91a8a5d09 @bguthrie bguthrie committed Sep 9, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/metrics/nps.rb
@@ -54,15 +54,15 @@ def email_by_timeframe(time_ago, opts={})
def email_aggregate(since)
actions = ScheduledEmail.where("created_at > ?", since).count
- subscribes = Signature.where("created_at > ?", since).where(created_member: true).where(@signature_referer_filter).count
+ subscribes = Signature.created.where("created_at > ?", since).where(created_member: true).count
unsubscribes = Unsubscribe.where("cause='unsubscribed' and created_at > ?", since).count
Metrics::Nps.new id: since, actions: actions, subscribes: subscribes, unsubscribes: unsubscribes
end
def facebook_aggregate(since)
actions = FacebookAction.where("created_at > ?", since).count
- subscribes = Signature.where("created_at > ?", since).where(created_member: true).where(@signature_referer_filter).count
+ subscribes = Signature.created.where("created_at > ?", since).where(created_member: true).count
unsubscribes = Unsubscribe.where("cause='unsubscribed' and created_at > ?", since).count
Metrics::Nps.new id: since, actions: actions, subscribes: subscribes, unsubscribes: unsubscribes

0 comments on commit f94245c

Please sign in to comment.