Send All Bids Ad Server Keys

Table of Contents

All AppNexus placements included in a single call to requestBids must belong to the same parent Publisher. If placements from two different publishers are included in the call, the AppNexus bidder will not return any demand for those placements. Note: This requirement does not apply to adapters that are aliasing the AppNexus adapter.

Bid Params

Name

Scope

Description

Example

Type

placementId

required

The placement ID from AppNexus. You may identify a placement using the invCode and member instead of a placement ID.

'234234'

string

member

optional

The member ID from AppNexus. Must be used with invCode.

'12345'

string

invCode

optional

The inventory code from AppNexus. Must be used with member.

'abc123'

string

user

optional

Object that specifies information about an external user. See User Object for details.

user: { age: 25, gender: 0, dnt: true}

object

allowSmallerSizes

optional

If true, ads smaller than the values in your ad unit’s sizes array will be allowed to serve. Defaults to false.

true

boolean

usePaymentRule

optional

If true, Appnexus will return net price to Prebid.js after publisher payment rules have been applied.

Indicates the type of supply for this placement. Possible values are web, mobile_web, mobile_app

'web'

string

pubClick

optional

Specifies a publisher-supplied URL for third-party click tracking. This is just a placeholder into which the publisher can insert their own click tracker. This parameter should be used for an unencoded tracker. This parameter is expected to be the last parameter in the URL. Please note that the click tracker placed in this parameter will only fire if the creative winning the auction is using AppNexus click tracking properly.

'http://click.adserver.com/'

string

extInvCode

optional

Specifies predefined value passed on the query string that can be used in reporting. The value must be entered into the system before it is logged.

Do not track flag. Indicates if tracking cookies should be disabled for this auction

true

boolean

language

Two-letter ANSI code for this user’s language.

EN

string

App Object

AppNexus supports using prebid within a mobile app’s webview. If you are interested in using an SDK, please see Prebid Mobile instead.

Name

Description

Example

Type

id

The App ID.

'B1O2W3M4AN.com.prebid.webview'

string

device_id

Object that contains the advertising identifiers of the user (idfa, aaid, md5udid, sha1udid, or windowsadid).

{ aaid: "38400000-8cf0-11bd-b23e-10b96e40000d" }

object

geo

Object that contains the latitude (lat) and longitude (lng) of the user.

{ lat: 40.0964439, lng: -75.3009142 }

object

Custom Targeting keys

AppNexus returns custom keys that can be sent to the adserver through bidderSettings: buyerMemberId, dealPriority, and dealCode. The following snippet demonstrates how to add these custom keys as key-value pairs.

Passing Keys Without Values

It’s possible to use the keywords parameter to define keys that do not have any associated values. Keys with empty values can be created in Prebid.js and can also be sent through Prebid Server to AppNexus. The following are examples of sending keys with empty values:

keywords: {
myKeyword: '',
myOtherKeyword: ['']
}

The preceding example passes the key myKeyword with an empty value. The key myOtherKeyword contains an empty value array.

You can define keys with values and without values in the same keywords definition. In this next example, we’ve defined the key color with an array of values: red, blue, and green. We’ve followed that with the key otherKeyword with an empty value array.

keywords: {
color: ['red', 'blue', 'green'],
otherKeyword: ['']
}

Debug Auction

Enabling the AppNexus Debug Auction feature should only be done for diagnosing the AppNexus auction. Do not enable this feature in a production setting where it may impact users.

To understand what is happening behind the scenes during an auction, you can enable a debug auction by adding an apn_prebid_debug cookie with a JSON string. For example: