mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Don't use a special cpm for country level targeting.
This commit is contained in:
@@ -548,7 +548,6 @@ COINBASE_BUTTONID_ONETIME_3YR =
|
||||
selfserve_support_email = selfservesupport@mydomain.com
|
||||
MAX_CAMPAIGNS_PER_LINK = 100
|
||||
cpm_selfserve = 1.00
|
||||
cpm_selfserve_geotarget_country = 1.25
|
||||
cpm_selfserve_geotarget_metro = 2.00
|
||||
cpm_selfserve_collection = 0.75
|
||||
authorizenetapi =
|
||||
|
||||
@@ -716,8 +716,6 @@ class PromoteApiController(ApiController):
|
||||
|
||||
if location and location.metro:
|
||||
cpm = g.cpm_selfserve_geotarget_metro.pennies
|
||||
elif location:
|
||||
cpm = g.cpm_selfserve_geotarget_country.pennies
|
||||
elif (target.is_collection and
|
||||
target.collection.name == "technology buffs"):
|
||||
# special price override -- technology collection is more expensive
|
||||
|
||||
@@ -269,7 +269,6 @@ class Globals(object):
|
||||
'gold_month_price',
|
||||
'gold_year_price',
|
||||
'cpm_selfserve',
|
||||
'cpm_selfserve_geotarget_country',
|
||||
'cpm_selfserve_geotarget_metro',
|
||||
'cpm_selfserve_collection',
|
||||
],
|
||||
|
||||
@@ -361,25 +361,14 @@ r.sponsored = {
|
||||
|
||||
get_cpm: function($form) {
|
||||
var baseCpm = parseInt($("#bid").data("base_cpm")),
|
||||
geotargetCountryCpm = parseInt($("#bid").data("geotarget_country_cpm")),
|
||||
geotargetMetroCpm = parseInt($("#bid").data("geotarget_metro_cpm")),
|
||||
collectionCpm = parseInt($("#bid").data("collection_cpm")),
|
||||
isCountryGeotarget = $('#country').val() != '' && !$('#country').is(':disabled'),
|
||||
isMetroGeotarget = $('#metro').val() !== null && !$('#metro').is(':disabled'),
|
||||
isCollectionTarget = $('input[name="targeting"][value="collection"]').is(':checked'),
|
||||
isTechCollection = isCollectionTarget && $('input[name="collection"]:checked').val() == "technology buffs"
|
||||
|
||||
/*
|
||||
NOTE: checking for country and metro geotargeting use different
|
||||
conditions because the country select has an option "none" with value
|
||||
of "", while the metro select will be disabled when not selected,
|
||||
giving it a value of null
|
||||
*/
|
||||
|
||||
if (isMetroGeotarget) {
|
||||
return geotargetMetroCpm
|
||||
} else if (isCountryGeotarget) {
|
||||
return geotargetCountryCpm
|
||||
} else if (isCollectionTarget && !isTechCollection) {
|
||||
return collectionCpm
|
||||
} else {
|
||||
|
||||
@@ -318,7 +318,6 @@
|
||||
data-default_bid="${g.default_promote_bid}"
|
||||
data-min_bid="${thing.min_bid}"
|
||||
data-base_cpm="${thing.author.cpm_selfserve_pennies}"
|
||||
data-geotarget_country_cpm="${g.cpm_selfserve_geotarget_country.pennies}"
|
||||
data-geotarget_metro_cpm="${g.cpm_selfserve_geotarget_metro.pennies}"
|
||||
data-collection_cpm="${g.cpm_selfserve_collection.pennies}"/>
|
||||
<div class="minimum-spend">
|
||||
|
||||
Reference in New Issue
Block a user