-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add native aspect ratio info to AN adapter docs (#543)
* Add native aspect ratios to AppNexus adapter docs Also did some general cleanup and formatting while I was in there. * Update field defs a bit; add OpenRTB native link * Remove OpenRTB note based on feedback * Add banner, video, and native sections * WIP native updates across several pages * Tweak language in AN bidder doc links * Edit down to a single native example; s/Ast//g * Update native example code; s/Ast//g * Show `mediaTypes.native.image.sizes` in examples In addition to updating the basic examples to use sizes for images and icons, we add a section to both the API reference and the 'Show Native Ads' page that lists both ways to define sizes for image-like assets. Since the content is the same, it's in a shared file sourced using the Liquid `include` keyword. * Fix code formatting issue with included file * `adUnit.sizes` is ignored on native ad units * Remove `adUnit.sizes` since banner sizes are used * Remove redundant `adUnit.sizes` from native ad * Use correct syntax for native "image-type" ad
- Loading branch information
1 parent
4dec78a
commit b2a2ce2
Showing
4 changed files
with
149 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
There are two methods for defining sizes for image-like assets (`image` and `icon`). Both are shown below, but the first example (using `sizes`) is more widely supported by demand partners. | ||
|
||
Using `mediaTypes.native.image.sizes` (or `mediaTypes.native.icon.sizes` for icons): | ||
|
||
{% highlight js %} | ||
|
||
mediaTypes: { | ||
native: { | ||
image: { | ||
required: true, | ||
sizes: [150, 50] | ||
} | ||
} | ||
} | ||
|
||
{% endhighlight %} | ||
|
||
Using `mediaTypes.native.image.aspect_ratios` (or `mediaTypes.native.icon.aspect_ratios` for icons): | ||
|
||
{% highlight js %} | ||
|
||
mediaTypes: { | ||
native: { | ||
image: { | ||
required: true, | ||
aspect_ratios: [{ | ||
min_width: 300, /* Optional */ | ||
ratio_width: 2, /* Required */ | ||
ratio_height: 3, /* Required */ | ||
}] | ||
} | ||
} | ||
} | ||
|
||
{% endhighlight %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters