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
|
isKid = not isAdult # Assume kid if not specified
|
||||||
offers =
|
offers =
|
||||||
'app-academy': isAdult and isVeryFast
|
'app-academy': isAdult and isVeryFast
|
||||||
'designlab': isAdult
|
'designlab': isAdult and Math.random() < 0.25
|
||||||
'tealeaf-academy': isAdult and isFast
|
'tealeaf-academy': isAdult and isFast
|
||||||
'talent-buddy': isAdult
|
'talent-buddy': isAdult and Math.random() < 0.25
|
||||||
'coding-campus': isAdult and Math.random() < 0.5 # TODO: geodetect UT and give priority
|
'coding-campus': isAdult and Math.random() < 0.25 # TODO: geodetect UT and give priority
|
||||||
'viking': isAdult and isFast
|
'viking': isAdult and isFast
|
||||||
'maker-square': isAdult and isFast
|
'maker-square': isAdult and isFast
|
||||||
|
'the-firehose-project': isAdult and isFast
|
||||||
#'mv-code-club': isKid # TODO: geodetect, get landing page URL
|
#'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']
|
possibleAdditionalOffers = ['code-school', 'one-month', 'learnable', 'pluralsight']
|
||||||
for offer in _.sample possibleAdditionalOffers, nAdditionalOffers
|
for offer in _.sample possibleAdditionalOffers, nAdditionalOffers
|
||||||
offers[offer] = true
|
offers[offer] = true
|
||||||
|
|
Reference in a new issue