> For the complete documentation index, see [llms.txt](https://adagio-io.gitbook.io/adagio-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adagio-io.gitbook.io/adagio-documentation/prebid/prebid.js-getting-started/prebid-adagio-adapter.md).

# Prebid Adagio adapter

{% hint style="info" %}
Adagio's Prebid Client Adapter allow to monetise web inventory through Prebid.js

It **supports display, native and outstream formats.**
{% endhint %}

{% stepper %}
{% step %}

## **Install Adagio Prebid Client Adapter**

1. If not yet installed, [download Prebid](https://docs.prebid.org/download.html)
2. Read our [official Adapter's Prebid documentation](https://docs.prebid.org/dev-docs/bidders/adagio.html)
3. (Advanced) You can also directly acces it's code on Github
   1. <https://github.com/prebid/Prebid.js/blob/master/modules/adagioBidAdapter.js>
   2. <https://github.com/prebid/Prebid.js/blob/master/modules/adagioBidAdapter.md>
      {% endstep %}

{% step %}

## Set our Adapter required parameters

{% hint style="danger" %}
**Required:** As opposed to other Supply Side Parters (SSPs), Adagio doesn't require the creation of any **tag ID**, **zone ID**, **format ID**, **placement ID** or anything else but the line items. Instead it relies on the following required parameters to group AdUnits.
{% endhint %}

<table><thead><tr><th width="147.37109375">Parameter</th><th width="92.734375">Type</th><th width="108.859375">Required</th><th width="207.69140625">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>organizationId</code></td><td>string</td><td><mark style="color:red;">Required</mark></td><td><strong>Identifier of the Organization</strong>. Handed out by Adagio.</td><td><code>'1000'</code></td></tr><tr><td><code>site</code></td><td>string</td><td><mark style="color:red;">Required</mark></td><td><strong>Name of the site.</strong> Found on our Webapp (picked at inventory creation time).<br><br>- max length: 50</td><td><code>'mysite-com'</code></td></tr><tr><td><code>placement</code></td><td>string</td><td><mark style="color:red;">Required</mark></td><td><strong>Describes the placement of an adunit in a page</strong>. Must not contain any information about the type of device.<br><br><a data-mention href="/adagio-documentation/operations-and-support/standards-and-compliance/placement-limits-and-guidelines.md">Placement Limits and Guidelines</a><br>- max length: 50<br>- max distinctives values: 10</td><td><code>'ban_atf'</code></td></tr></tbody></table>

{% code title="Here is an example of the adUnit's configuration" %}

```javascript
var adUnits = [{
  // ...code: 'ban-atf',
  // ...mediaTypes: {...},
  // ...sizes: {...},

  // Dedicated Adagio bidder params
  bids: [{
    bidder: "adagio",
    params: {
      organizationId: "1000",                // Required
      site: "my-site",                       // Required
      placement: "my-adg-placement",       // Required
    },
  }],
```

{% endcode %}
{% endstep %}

{% step %}

## Add ortb2Imp and ortb2 params

{% hint style="danger" %}
**Required**
{% endhint %}

<table><thead><tr><th width="116.81640625">Parameter</th><th width="93.7109375">Type</th><th>Requirements</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><code>divId</code></td><td>string</td><td><mark style="color:red;">Required</mark></td><td><strong>Refers to the adunit <code>html</code> attribute id in a page</strong>.<br><br>Must exists in the html code of the website.</td><td><code>'div-gpt-ad-1542984663788-0'</code></td></tr><tr><td><code>pagetype</code></td><td>string</td><td><mark style="color:purple;">Recommended</mark></td><td><strong>Describes what kind of content will be present in the page.</strong><br><br>- max length: 30<br>- max distinctives values: 50</td><td><code>'article'</code></td></tr><tr><td><code>category</code></td><td>string</td><td><mark style="color:purple;">Recommended</mark></td><td><strong>Category of the content displayed in the page.</strong><br><br>- max length: 30<br>- max distinctives values: 50</td><td><code>'sport'</code></td></tr></tbody></table>

{% code title="Example of configuration" %}

```javascript
var adUnits = [{
  // ...code: 'ban-atf',
  // ...mediaTypes: {...},
  // ...sizes: {...},

  // Params shared between all bidders
  ortb2Imp: {
    ext: {
      data: {
        divId: "div-gpt-ad-1460505748561-0", // Required
      }
    }
  },
}];

pbjs.setConfig({
  // Params shared for the current page
  ortb2: {
    site: {
      ext: {
        data: {
          pagetype: "article",                // Recommended
          category: "economy",                // Optional    
        }
      }
    }
  },
});
```

{% endcode %}
{% endstep %}

{% step %}

## Review your technical integration

{% content-ref url="/pages/DeJ8AIPpsiKRPcHIgiIT" %}
[Review your technical integration](/adagio-documentation/prebid/prebid.js-getting-started/review-your-technical-integration.md)
{% endcontent-ref %}
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://adagio-io.gitbook.io/adagio-documentation/prebid/prebid.js-getting-started/prebid-adagio-adapter.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
