Skip to content

Commit

Permalink
analyticsRecorder: ad slot stats for epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivo Georgiev committed Jun 3, 2020
1 parent aa86c75 commit b6875d4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion services/sentry/analyticsRecorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@ function record(channel, session, events, payouts) {
? [
// publisher -> ad slot -> impressions, clicks (will calculate %, CTR); answers which of my slots perform best
['zincrby', `reportPublisherToAdSlot:${ev.type}:${publisher}`, 1, ev.adSlot],
['zincrby', `reportPublisherToAdSlotPay:${ev.type}:${publisher}`, payAmount, ev.adSlot]
['zincrby', `reportPublisherToAdSlotPay:${ev.type}:${publisher}`, payAmount, ev.adSlot],
// epoch -> publisher -> ad slot -> impressions
[
'zincrby',
`reportPublisherToAdSlotEpoch:${getEpoch()}:${ev.type}:${publisher}`,
1,
ev.adSlot
],
['zincrby', `reportAdSlotEpoch:${getEpoch()}:${ev.type}`, 1, ev.adSlot]
]
: []
const countryPubSuffix = `${getEpoch()}:${ev.type}:${publisher}`
Expand Down

0 comments on commit b6875d4

Please sign in to comment.