Skip to content

Commit 02dd106

Browse files
aneuway2jeanstemp
authored andcommitted
Update Appnexus Bid Parameters for app and Prebid 1.x v.s. legacy (#932)
* Adding addiional info on onEvent handlers, and PBS timeout * Appnexus adaptor parameters. Added for prebid/Prebid.js#2973, sorted out the prebid 1.x versus the legacy ast/jpt adaptors. Added disclaimer on * Updating sample native adserver creative to add in click tracking * made minor changes from review. Also added video params tabel from AST to 1.x version and info about keywords to the upgrade section * Fix to typos
1 parent 8ec98f7 commit 02dd106

File tree

4 files changed

+131
-55
lines changed

4 files changed

+131
-55
lines changed

adops/setting-up-prebid-native-in-dfp.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ In this example, we're targeting `"prebid_native_adunit"`, so the *Size* is set
4444
Add the HTML and CSS that define your native ad template. Note that `%%PATTERN%%` macros can be included in either field, and the HTML can contain JavaScript. For more information, see the [DFP native styles docs](https://support.google.com/dfp_premium/answer/6366914).
4545

4646
{: .alert.alert-danger :}
47-
**Native impression tracking requirements**
48-
You must include the `postMessage` code snippet as shown in the screenshot and example code below so impression trackers will fire.
47+
**Native impression and click tracking requirements**
48+
You must include the `postMessage` and `onclick` JavaScript snippets as shown in the example code below so that impression trackers and click trackers will fire.
4949

5050
{: .pb-img.pb-lg-img :}
5151
![Native ad content]({{site.github.url}}/assets/images/ad-ops/dfp-native/native-content-ad.png)
@@ -57,17 +57,19 @@ Example HTML and CSS:
5757
<div class="sponsored-post">
5858
<div class="thumbnail"></div>
5959
<div class="content">
60-
<h1><a href="%%CLICK_URL_UNESC%%%%PATTERN:hb_native_linkurl%%" target="_blank">%%PATTERN:hb_native_title%%</a></h1>
60+
<h1><a href="%%CLICK_URL_UNESC%%%%PATTERN:hb_native_linkurl%%" target="_blank" onclick="window.track('click', '%%PATTERN:hb_adid%%');">%%PATTERN:hb_native_title%%</a></h1>
6161
<p>%%PATTERN:hb_native_body%%</p>
6262
<div class="attribution">%%PATTERN:hb_native_brand%%</div>
6363
</div>
6464
</div>
6565

6666
<script>
67-
window.parent.postMessage(JSON.stringify({
68-
message: 'Prebid Native',
69-
adId: '%%PATTERN:hb_adid%%'
70-
}), '*');
67+
window.track = function (action, adId) {
68+
var message = {message: 'Prebid Native', adId: adId};
69+
if (action === 'click') { message.action = 'click'; }
70+
window.parent.postMessage(JSON.stringify(message), '*');
71+
}
72+
window.track('impression', '%%PATTERN:hb_adid%%');
7173
</script>
7274

7375
{% endhighlight %}

dev-docs/bidders/appnexus-ast.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,21 @@
11
---
22
layout: bidder
3-
title: AppNexus AST
3+
title: AppNexus AST (legacy)
44
description: Prebid AppNexus AST Bidder Adaptor
55
top_nav_section: dev_docs
66
nav_section: reference
77
hide: true
88
biddercode: appnexusAst
99
biddercode_longer_than_12: false
1010
prebid_1_0_supported : false
11-
media_types: native, video
11+
media_types: banner, native, video
1212
---
1313

14-
Advantages of using the `appnexusAst` adapter over the `appnexus`
15-
adapter include:
16-
17-
- Requests all the adUnits at once, which reduces latency on page
18-
19-
- Supports additional formats (such as Video)
20-
21-
- Will continue to be upgraded as enhancements are made to Prebid.js
22-
for expanding capabilities
23-
2414
{: .alert.alert-warning :}
25-
As part of the transition to Prebid 1.0, the AppNexus AST adapter will become the standard (and only) AppNexus adapter (and be renamed to "AppNexus"). From a developer's perspective, the primary change from the legacy adapter is that keywords must be passed using the `keywords` parameter documented below.
15+
Prebid.js 0.x includes two AppNexus Adaptors: `appnexus` and `appnexusAst`. As part of the transition to Prebid 1.0, the AppNexus AST adapter will become the standard (and only) AppNexus adapter (and be renamed to "AppNexus").
2616

27-
{: .alert.alert-danger :}
28-
All AppNexus placements included in a single call to `requestBids` must belong to the same publisher object. If placements from two different publishers are included in the call, the AppNexus bidder may not return any demand for those placements. <br />
29-
*Note: This requirement does not apply to adapters that are [aliasing]({{site.baseurl}}/dev-docs/publisher-api-reference.html#module_pbjs.aliasBidder) the AppNexus adapter.*
3017

31-
### bid params
18+
### Bid Params
3219

3320
{: .table .table-bordered .table-striped }
3421
| Name | Scope | Description | Example | Type |
@@ -39,13 +26,17 @@ All AppNexus placements included in a single call to `requestBids` must belong t
3926
| `video` | optional | Video targeting parameters. See the [video section below](#appnexus-ast-video) for details. | `{ playback_method: ['auto_play_sound_off'] }` | `object` |
4027
| `invCode` | optional | The inventory code from AppNexus. Must be used with `member`. | `'abc123'` | `string` |
4128
| `member` | optional | The member ID from AppNexus. Must be used with `invCode`. | `'12345'` | `string` |
42-
| `reserve` | optional | Sets a floor price for the bid that is returned | `0.90` | `float` |
29+
| `reserve` | optional | Sets a floor price for the bid that is returned. If floors have been configured in the AppNexus Console, those settings will override what is configured here. | `0.90` | `float` |
4330

4431
(Sizes set in `adUnit` object will also apply to the AppNexus bid requests.)
4532

33+
{: .alert.alert-danger :}
34+
All AppNexus placements included in a single call to `requestBids` must belong to the same publisher object. If placements from two different publishers are included in the call, the AppNexus bidder may not return any demand for those placements. <br />
35+
*Note: This requirement does not apply to adapters that are [aliasing]({{site.baseurl}}/dev-docs/publisher-api-reference.html#module_pbjs.aliasBidder) the AppNexus adapter.*
36+
4637
<a name="appnexus-ast-video"></a>
4738

48-
#### video
39+
#### video parameters
4940

5041
The following video parameters are supported. For more information, see the video parameters in the [OpenRTB specification](http://www.iab.com/wp-content/uploads/2016/01/OpenRTB-API-Specification-Version-2-4-DRAFT.pdf).
5142

@@ -59,3 +50,11 @@ The following video parameters are supported. For more information, see the vid
5950
| `skippable` | Boolean which, if `true`, means the user can click a button to skip the video ad. Defaults to `false`. | `boolean` |
6051
| `playback_method` | Array of strings listing playback methods supported by the publisher. Allowed values: `"auto_play_sound_on"`; `"auto_play_sound_off"`; `"click_to_play"`; `"mouseover"`; `"auto_play_sound_unknown"`. | `Array<string>` |
6152
| `frameworks` | Array of integers listing API frameworks supported by the publisher. Allowed values: None: `0`; VPAID 1.0: `1`; VPAID 2.0: `2`; MRAID 1.0: `3`; ORMMA: `4`; MRAID 2.0: `5`. | `Array<integer>` |
53+
54+
### Advantages of using the Appnexus AST (legacy) Adaptor over the AppNexus (legacy) Adaptor
55+
56+
- Requests all the adUnits at once, which reduces latency on page
57+
58+
- Supports additional formats (such as Video and Native)
59+
60+
- Uses the same endpoints and parameter settings as the Prebid 1.x AppNexus adaptor.

dev-docs/bidders/appnexus-jpt.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
layout: bidder
3+
title: AppNexus (legacy)
4+
description: Prebid AppNexus Bidder Adaptor
5+
top_nav_section: dev_docs
6+
nav_section: reference
7+
hide: true
8+
biddercode: appnexus
9+
biddercode_longer_than_12: false
10+
prebid_1_0_supported : false
11+
media_types: banner
12+
---
13+
14+
{: .alert.alert-warning :}
15+
Prebid.js 0.x includes two AppNexus Adaptors: `appnexus` and `appnexusAst`. As part of the transition to Prebid 1.0, the AppNexus AST adapter will become the standard (and only) AppNexus adapter (and be renamed to "AppNexus"). From a developer's perspective, the primary change from the AppNexus (legacy) adapter to either the AppNexus AST (legacy) or Prebid 1.x adaptor is that keywords must be passed using the `keywords` parameter instead of an `"arbitraryKey"`.
16+
17+
### Bid Params
18+
19+
{: .table .table-bordered .table-striped }
20+
| Name | Scope | Description | Example | Type |
21+
|------------------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|------------------|
22+
| `placementId` | required | The placement ID from AppNexus. You may identify a placement using the `invCode` and `member` instead of a placement ID. | `234234` | `int` |
23+
| `"arbitraryKey"` | optional | This key can be *any publisher-defined string*. The value (also a string) maps to a querystring segment for enhanced buy-side targeting. Multiple key-value pairs can be added as shown [below](#appnexus-pub-keys). | `'genre': 'rock'` | `keyValue` |
24+
| `invCode` | optional | The inventory code from AppNexus. Must be used with `member`. | `'abc123'` | `string` |
25+
| `member` | optional | The member ID from AppNexus. Must be used with `invCode`. | `'12345'` | `string` |
26+
27+
<a name="appnexus-pub-keys" />
28+
29+
#### Support for publisher-defined keys
30+
31+
To pass in a publisher-defined key whose value maps to a querystring segment for buy-side targeting, set up your `params` object as shown below. For more information, see the [query string targeting documentation](https://wiki.appnexus.com/x/7oCzAQ) (login required).
32+
33+
{% highlight js %}
34+
var adUnits = [{
35+
code: 'div-gpt-ad-1460505748511-01',
36+
sizes: [
37+
[300, 250],
38+
[300, 50]
39+
],
40+
bids: [{
41+
bidder: 'appnexus',
42+
params: {
43+
placementId: '123456789',
44+
'playlist': '12345', // <----| Publisher-defined key-values
45+
'genre': 'rock' // <----| (key and value must be strings)
46+
}
47+
}]
48+
}]
49+
{% endhighlight %}

0 commit comments

Comments
 (0)