Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix top level linting errors in dev-docs #4653

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .markdownlintignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion dev-docs/adunit-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

<a name="adUnit.bids"></a>
Expand Down
12 changes: 6 additions & 6 deletions dev-docs/analytics-ga.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ nav_section: reference
* TOC
{:toc }

### Code Example
## Code Example

```javascript

Expand All @@ -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:

Expand All @@ -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)).

Expand All @@ -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`)

Expand Down
72 changes: 34 additions & 38 deletions dev-docs/bidder-adaptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,48 +109,43 @@ Module that connects to Example's demand sources
];
```

```html

<a name="bidder-adaptor-Designing-your-Bid-Params"></a>

### 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"
}
},
}]
}];

}]
}];
```

<a name="bidder-adaptor-HTTP-simple-requests"></a>

### 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.

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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`).

Expand Down Expand Up @@ -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
Expand All @@ -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 :}
Expand Down Expand Up @@ -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
{
...
Expand Down Expand Up @@ -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
{
...
Expand Down Expand Up @@ -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).

Expand Down Expand Up @@ -1281,7 +1277,7 @@ registerBidder(spec);

For example:

```
```markdown
---
layout: bidder
title: example
Expand Down
20 changes: 10 additions & 10 deletions dev-docs/bidders.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You can also download the full <a href="/dev-docs/bidder-data.csv" download>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

<input type="text" id="autocomplete-filter" class="autocomplete-filter">
<script src="https://cdnjs.cloudflare.com/ajax/libs/awesomplete/1.1.5/awesomplete.min.js" integrity="sha512-HcBl0GSJvt4Qecm4srHapirUx0HJDi2zYXm6KUKNNUGdTIN9cBwakVZHWmRVj4MKgy1AChqhWGYcMDbRKgO0zg==" crossorigin="anonymous"></script>
Expand All @@ -35,9 +35,9 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
<script src="{{site.baseurl}}/assets/js/autocomplete.js"></script>
<div class="c-bidder-list-group" markdown="1">

### Full List
## Full List

#### #-A
### #-A

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -49,7 +49,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### B-C
### B-C

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -61,7 +61,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### D-G
### D-G

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -73,7 +73,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### H-L
### H-L

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -85,7 +85,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### M-O
### M-O

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -97,7 +97,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### P-R
### P-R

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -109,7 +109,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### S-T
### S-T

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand All @@ -121,7 +121,7 @@ var AutocompleteList = [{% for page in bidder_pages %}{ label: '{{ page.title }}
{% endfor %}
</ul>

#### U-Z
### U-Z

<ul class="c-bidder-list">
{% for page in bidder_pages %}
Expand Down