forked from kmjennison/dfp-prebid-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.appnexus.py
149 lines (117 loc) · 3.82 KB
/
settings.appnexus.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import os
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
GOOGLEADS_YAML_FILE = os.path.join(ROOT_DIR, 'googleads.yaml')
#########################################################################
# DFP SETTINGS
#########################################################################
# A string describing the order
DFP_ORDER_NAME = "iOS Prebid | AppNexus | 2017-07-26 (auto-generated)"
# The email of the DFP user who will be the trafficker for
# the created order
DFP_USER_EMAIL_ADDRESS = "[email protected]"
# The exact name of the DFP advertiser for the created order
DFP_ADVERTISER_NAME = "AppNexus"
PREBID_BIDDER_CODE = "appnexus"
# Names of placements the line items should target.
# DFP_TARGETED_PLACEMENT_NAMES = ["Prebid_Web"]
DFP_TARGETED_PLACEMENT_NAMES = ["Prebid_iOS"]
# Sizes of placements. These are used to set line item and creative sizes.
DFP_PLACEMENT_SIZES = [
{
'width': '320',
'height': '50'
},
{
'width': '300',
'height': '250'
}#,
# {
# 'width': '300',
# 'height': '600'
# },
# {
# 'width': '728',
# 'height': '90'
# },
# {
# 'width': '970',
# 'height': '90'
# },
# {
# 'width': '970',
# 'height': '250'
# }
]
# Whether we should create the advertiser in DFP if it does not exist.
# If False, the program will exit rather than create an advertiser.
DFP_CREATE_ADVERTISER_IF_DOES_NOT_EXIST = True
# If settings.DFP_ORDER_NAME is the same as an existing order, add the created
# line items to that order. If False, the program will exit rather than
# modify an existing order.
DFP_USE_EXISTING_ORDER_IF_EXISTS = True
# Optional
# Each line item should have at least as many creatives as the number of
# ad units you serve on a single page because DFP specifies:
# "Each of a line item's assigned creatives can only serve once per page,
# so if you want the same creative to appear more than once per page,
# copy the creative to associate multiple instances of the same creative."
# https://support.google.com/dfp_sb/answer/82245?hl=en
#
# This will default to the number of placements specified in
# `DFP_TARGETED_PLACEMENT_NAMES`.
# DFP_NUM_CREATIVES_PER_LINE_ITEM = 2
# Optional
# The currency to use in DFP when setting line item CPMs. Defaults to 'USD'.
# DFP_CURRENCY_CODE = 'USD'
#########################################################################
# PREBID SETTINGS
#########################################################################
DFP_NUM_CREATIVES_PER_LINE_ITEM = 1
# Price buckets. This should match your Prebid settings for the partner. See:
# http://prebid.org/dev-docs/publisher-api-reference.html#module_pbjs.setPriceGranularity
# FIXME: this should be an array of buckets. See:
# https://github.com/prebid/Prebid.js/blob/8fed3d7aaa814e67ca3efc103d7d306cab8c692c/src/cpmBucketManager.js
#MOBILE BUCKETS FOR "AUTO" GRANULARITY - run the script three times, once with each bucket un-commented
# PREBID_PRICE_BUCKETS = {
# 'precision': 2,
# 'min' : 0.05,
# 'max' : 5.00,
# 'increment': 0.05
# }
# PREBID_PRICE_BUCKETS = {
# 'precision': 2,
# 'min' : 5.10,
# 'max' : 10,
# 'increment': 0.10,
# }
PREBID_PRICE_BUCKETS = {
'precision': 2,
'min' : 10.50,
'max' : 20,
'increment': 0.50,
}
#WEB BUCKETS FOR FLEXIBLE GRANULARITY - run the script three times, once with each bucket un-commented
# PREBID_PRICE_BUCKETS = {
# 'precision': 2,
# 'min' : 0.02,
# 'max' : 2.00,
# 'increment': 0.02,
# }
# PREBID_PRICE_BUCKETS = {
# 'precision': 2,
# 'min' : 2.10,
# 'max' : 10,
# 'increment': 0.10,
# }
# PREBID_PRICE_BUCKETS = {
# 'precision': 2,
# 'min' : 10.25,
# 'max' : 35,
# 'increment': 0.25,
# }
#########################################################################
# Try importing local settings, which will take precedence.
try:
from local_settings import *
except ImportError:
pass