diff --git a/.markdownlintignore b/.markdownlintignore index b6e499d831..d593df8346 100644 --- a/.markdownlintignore +++ b/.markdownlintignore @@ -5,7 +5,13 @@ vendor/ node_modules/ # Directories which remain to be fixed -dev-docs/ +dev-docs/analytics/ +dev-docs/bidders/ +dev-docs/examples/ +dev-docs/modules/ +dev-docs/plugins/ +dev-docs/publisher-api-reference/ +dev-docs/requirements/ faq/ examples/ partners/ diff --git a/dev-docs/adunit-reference.md b/dev-docs/adunit-reference.md index 39d30ea834..ad49c28426 100644 --- a/dev-docs/adunit-reference.md +++ b/dev-docs/adunit-reference.md @@ -40,7 +40,7 @@ See the table below for the list of properties on the ad unit. For example ad u | `ortb2Imp` | Optional | Object | ortb2Imp is used to signal OpenRTB Imp objects at the adUnit grain. Similar to the global ortb2 field used for [global first party data configuration](/dev-docs/publisher-api-reference/setConfig.html#setConfig-fpd), but specific to this adunit.| | `ttlBuffer` | Optional | Number | TTL buffer override for this adUnit. See [setConfig({ttlBuffer})](/dev-docs/publisher-api-reference/setConfig.html#setConfig-ttlBuffer) | | `renderer` | Optional | Object | Custom renderer, typically used for [outstream video](/dev-docs/show-outstream-video-ads.html) | -| `video` | Optional | Object | Used to link an Ad Unit to the [Video Module][videoModule]. For allowed params see the [adUnit.video reference](#adUnit-video). | +| `video` | Optional | Object | Used to link an Ad Unit to the [Video Module][videoModule]. For allowed params see the [adUnit.video reference](#adunitvideo). | | `deferBilling` | Optional | Boolean | Used by a publisher to flag adUnits as being separately billable. This allows for a publisher to trigger billing manually for winning bids. See [pbjs.triggerBilling](/dev-docs/publisher-api-reference/triggerBilling.html) and [onBidBillable](/dev-docs/bidder-adaptor.html#registering-on-bid-billable) for more info. | diff --git a/dev-docs/analytics-ga.md b/dev-docs/analytics-ga.md index e1102eb996..d0981f4d19 100644 --- a/dev-docs/analytics-ga.md +++ b/dev-docs/analytics-ga.md @@ -18,7 +18,7 @@ nav_section: reference * TOC {:toc } -### Code Example +## Code Example ```javascript @@ -41,19 +41,19 @@ pbjs.que.push(function() { ``` -##### A Few Requirements +### A Few Requirements 1. This code snippet has to be inserted after the `'ga'` param is available. 2. This code snippet has to be inserted after pbjs.que has been defined. 3. You must include `"ga"` in the `"analytics"` array in `package.json`. -##### Distribution Data +### Distribution Data Note: we recommend disabling `enableDistribution` if you are using more than 4 bidders. This is because GA throttles the number of events that can be logged (20 initial + 2/second). Distribution data provides you with a histogram of CPM distribution and bid load time (latency) for each bidder. See distribution data [demo here](https://prebid.org/blog/header-bidding-analytics-coming-soon/#histogram-analysis-of-latency-and-cpm-distribution). See [this link](https://developers.google.com/analytics/devguides/collection/protocol/v1/limits-quotas) for details on GA's throttling. -##### Sampling +### Sampling To track a lower volume of traffic in Google Analytics, you may specify a sample rate in the options. For example, to set up a 5% sample rate: @@ -76,7 +76,7 @@ Of course a smaller sample rate means that reported numbers will be correspondin It should also be noted that all events on a given page are subject to the same analytics behavior. This means that all requests, responses, and renders on a page are either logged or not logged. -### How Prebid.js uses GA's Events +## How Prebid.js uses GA's Events Prebid.js sends out GA-compatible [Events](https://support.google.com/analytics/answer/1033068). (For more information, see the GA docs on [Event Tracking](https://developers.google.com/analytics/devguides/collection/analyticsjs/events)). @@ -94,7 +94,7 @@ In this example, the page has 1 ad unit with 3 bidders. The timeout is set to 40 Note that a Win event is a true win, meaning that it is not just the highest bid in the header bidding auction, but the winning bid across the entire auction hosted by the ad server and its creative is served back to the page. -### How to Verify it Works +## How to Verify it Works After you've implemented the above code snippet, load the page a few times, wait 1-2 hours for GA's data pipeline to finish, and go to your GA Reporting screen. Navigate to **Behavior > Events**. You should be able to find the Prebid.js events (if you have many other events, filter **Event Category** by `Prebid.js`) diff --git a/dev-docs/bidder-adaptor.md b/dev-docs/bidder-adaptor.md index 762bc7e05d..ae64365efc 100644 --- a/dev-docs/bidder-adaptor.md +++ b/dev-docs/bidder-adaptor.md @@ -109,48 +109,43 @@ Module that connects to Example's demand sources ]; ``` -```html - -### Designing your Bid Params +## Designing your Bid Params The parameters of your ad request will be stored in the ad unit's `bid.params` object. You can include tag info, ad size, keywords, and other data such as video parameters. For more information about the kinds of information that can be passed using these parameters, see the example below, as well as [the existing bidder parameters]({{site.baseurl}}/dev-docs/bidders.html). ```javascript - -{ - var adUnits = [{ - code: "top-med-rect", - mediaTypes: { - banner: { - sizes: [ - [300, 250], - [300, 600] - ] +var adUnits = [{ + code: "top-med-rect", + mediaTypes: { + banner: { + sizes: [ + [300, 250], + [300, 600] + ] + } + }, + bids: [{ + bidder: "example", + // params is custom to the bidder adapter and will be + // passed through from the configuration as is. + params: { + unit: '3242432', + pgid: '123124', + custom: { + other: "xyz" } }, - bids: [{ - bidder: "example", - // params is custom to the bidder adapter and will be - // passed through from the configuration as is. - params: { - unit: '3242432', - pgid: '123124', - custom: { - other: "xyz" - } - }, - }] - }]; - + }] +}]; ``` -### HTTP Simple Requests +## HTTP Simple Requests When defining the HTTP headers for your endpoint, it is important from a performance perspective to consider what forces the browser to initiate a [CORS preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request). We encourage learning more about [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests) & [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) as it relates to your specific development configuration. @@ -302,6 +297,7 @@ Here is a sample array entry for `validBidRequests[]`: Retrieve your bid parameters from the `params` object. Other notes: + * **Bid ID** is unique across ad units and bidders. * **Transaction ID** is unique for each ad unit with a call to `requestBids()`, but same across bidders. This is the ID that enables DSPs to recognize the same impression coming in from different supply sources. * **Bid Request Count** is the number of times `requestBids()` has been called for this ad unit. @@ -338,6 +334,7 @@ Here is a sample bidderRequest object: ``` Notes on parameters in the bidderRequest object: + * **auctionID** is unique per call to `requestBids()`, but is the same across ad units. * **ortb2** is the global (not specific to any adUnit) [first party data](/features/firstPartyData.html) to use for all requests in this auction. Note that Prebid allows any standard ORTB field or extension as first party data - including items that typically wouldn't be considered as such, for example user agent client hints (`device.sua`) or information on the regulatory environment (`regs.ext.gpc`). @@ -731,22 +728,22 @@ If the alias entry is an object, the following attributes are supported: | `gvlid` | optional | global vendor list id of company scoped to alias | `integer` | | `skipPbsAliasing` | optional | ability to skip passing spec.code to prebid server in request extension. In case you have a prebid server adapter with the name same as the alias/shortcode. Default value: `false` | `boolean` | - {: .alert.alert-info :} Note on aliases and TCF Global Vendor List IDs: if an alias entry does not have its own GVLID but wishes to claim GDPR support, -the documentation entry (The file in https://github.com/prebid/prebid.github.io/tree/master/dev-docs/bidders) must list the GVLID of the main adapter with that company's name in parentheses. +the documentation entry (The file in [https://github.com/prebid/prebid.github.io/tree/master/dev-docs/bidders]) must list the GVLID of the main adapter with that company's name in parentheses. Look for other doc entries containing an `aliasCode` metadata entry. ### Supporting Privacy Regulations If your bid adapter is going to be used in Europe, you should support GDPR: + * Get a [Global Vendor ID](https://iabeurope.eu/vendor-list-tcf-v2-0/) from the IAB-Europe * Add your GVLID into the spec block as 'gvlid'. If you don't do this, Prebid.js may block requests to your adapter. * Read the gdprConsent string from the bid request object and pass it through to your endpoint If your bid adapter is going to be used in the United States, you should support COPPA and CCPA: -* Read the uspConsent string from the bid request object and pass it through t -o your endpoint + +* Read the uspConsent string from the bid request object and pass it through to your endpoint * Call config.getConfig('coppa') and forward to your endpoint ## Supporting Video @@ -758,13 +755,11 @@ Follow the steps in this section to ensure that your adapter properly supports v Add the `supportedMediaTypes` argument to the spec object, and make sure VIDEO is in the list: ```javascript - export const spec = { code: BIDDER_CODE, supportedMediaTypes: [VIDEO], - ... + // ... } - ``` {: .alert.alert-info :} @@ -834,7 +829,7 @@ Prebid now accepts multiple bid responses for a single `bidRequest.bids` object. #### Use case 1: I want to request my endpoint to return bids with varying ranges of durations -``` +```text AdUnit config { ... @@ -869,7 +864,7 @@ Prebid will set the rounded duration value in the `bid.video.durationBucket` fie #### Use case 2: I want to request my endpoint to return bids that exactly match the durations I want -``` +```text AdUnit config { ... @@ -1018,6 +1013,7 @@ In order for your bidder to support the native media type: 5. Your spec must declare NATIVE in the supportedMediaTypes array. There are two ways Prebid supports native: + * The preferred method is for publishers to [define their native assets directly in OpenRTB format](/prebid/native-implementation.html). * The legacy way is for pubs to supply a [Prebid-proprietary native asset syntax](/prebid/native-implementation-legacy.html). @@ -1281,7 +1277,7 @@ registerBidder(spec); For example: -``` +```markdown --- layout: bidder title: example diff --git a/dev-docs/bidders.md b/dev-docs/bidders.md index b0f6071d1a..d9ed856c7d 100644 --- a/dev-docs/bidders.md +++ b/dev-docs/bidders.md @@ -25,7 +25,7 @@ You can also download the full CSV {: .alert.alert-warning :} Publishers are advised to check with legal counsel before doing business with any particular bidder. -### Search a bidder +## Search a bidder @@ -35,9 +35,9 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
-### Full List +## Full List -#### #-A +### #-A -#### B-C +### B-C -#### D-G +### D-G -#### H-L +### H-L -#### M-O +### M-O -#### P-R +### P-R -#### S-T +### S-T -#### U-Z +### U-Z