mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Tweaking offer triggers.
This commit is contained in:
parent
a39a4d4c1c
commit
a7244e1567
1 changed files with 5 additions and 4 deletions
|
@ -718,14 +718,15 @@ sendNextStepsEmail = (user, now, daysAgo) ->
|
|||
isKid = not isAdult # Assume kid if not specified
|
||||
offers =
|
||||
'app-academy': isAdult and isVeryFast
|
||||
'designlab': isAdult
|
||||
'designlab': isAdult and Math.random() < 0.25
|
||||
'tealeaf-academy': isAdult and isFast
|
||||
'talent-buddy': isAdult
|
||||
'coding-campus': isAdult and Math.random() < 0.5 # TODO: geodetect UT and give priority
|
||||
'talent-buddy': isAdult and Math.random() < 0.25
|
||||
'coding-campus': isAdult and Math.random() < 0.25 # TODO: geodetect UT and give priority
|
||||
'viking': isAdult and isFast
|
||||
'maker-square': isAdult and isFast
|
||||
'the-firehose-project': isAdult and isFast
|
||||
#'mv-code-club': isKid # TODO: geodetect, get landing page URL
|
||||
nAdditionalOffers = 4 - _.filter(offers).length
|
||||
nAdditionalOffers = Math.max 0, 4 - _.filter(offers).length
|
||||
possibleAdditionalOffers = ['code-school', 'one-month', 'learnable', 'pluralsight']
|
||||
for offer in _.sample possibleAdditionalOffers, nAdditionalOffers
|
||||
offers[offer] = true
|
||||
|
|
Loading…
Reference in a new issue