---
metadata:
  - name: generator
    content: Diplodoc Platform v5.55.0
alternate:
  - https://yandex.com/support/adfox/en/monetization/adfox-hb.md
  - https://yandex.com/support/adfox/ru/monetization/adfox-hb.md
  - href: en/monetization/adfox-hb.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/support/adfox/en/llms.txt

# Connecting via Adfox HB

## To the monetizer {#bidder}

### Account setup {#setup}

1. To become an Adfox HB monetizer, contact [support](https://yandex.com/support/adfox/en/support/feedback.md).
1. [Add a website, section, or placement](https://yandex.com/support/adfox/en/ad-inventory/sites.md) that the publisher will access via Header Bidding.
    
1. Determine the type of banner and templates that you'll connect the publisher to. If there is no banner type with templates, add it by following these [instructions](https://yandex.com/support/adfox/en/ad-inventory/settings/banner-types.md#add-banner-type).
    
1. Place an ad campaign and banners that will be displayed on the publisher's side in the created placement.
    
    Learn more about [creating ad campaigns](https://yandex.com/support/adfox/en/campaigns/add-new.md) and [adding banners](https://yandex.com/support/adfox/en/sites/add-banner-new.md).
    
1. Set the total CPM for the ad campaign.
    
    You can also set a separate CPM for specific placements. To enable this feature, contact [Adfox support](https://yandex.com/support/adfox/en/support/feedback.md).
    
    {% list tabs %}
    
    - At the campaign or flight level
    
      1. On the **Campaigns** tab, find the campaign with the CPM that you want to configure. Specify the CPM for this campaign in the **CPM, ₽** column.

      1. To set the CPM for a flight, click ![](../_images/parameters.svg)**Settings** to the left of the campaign name. The tab with the parameters of the ad campaign opens.

      1. Go to the **Flights** tab. A list of flights within the campaign opens.

      1. Set the CPM for the desired flight in the **CPM, ₽** column.
    
    - At the level of a specific ad placement
    
      1. On the **Campaigns** tab, find the desired campaign. Click ![](../_images/placements.svg)**Placement** to the left of the campaign name.

      1. In the tab that opens, click ![](../_images/sections.svg)**Sections** to the right of the site name. The tab with site sections opens.

      1. To the right of the section name, click ![](../_images/places.svg)**Placements**.

      1. Set the CPM for the desired placement in the **CPM, ₽** column.
    
    {% endlist %}
    
1. [Get the ad tag](https://yandex.com/support/adfox/en/ad-inventory/codes/get-code.md#place-code) of the placement and send it to the publisher.


## To the publisher {#publisher}

To learn how to set up an account, see [Setting up an Adfox account for monetization with Header Bidding](https://yandex.com/support/adfox/en/monetization/hb-setup.md).

### Checking integration {#integration-checking}

To check that Header Bidding is configured correctly on the publisher's side, you can do the following:

1. Make sure that the correct parameters are specified in the Header Bidding settings:
    
    - In the [browser console](https://yandex.com/support/adfox/en/support/yan_console.md) on the publisher's site, run the following command:

        ```javascript
        window.YaHeaderBiddingSettings
        ```

      The Header Bidding settings object will be displayed in the console.

    - For the `code` (container id on the page) parameter within it, find the `adUnit` that should contain the IDs for calling the monitizer placement.

    - Make sure that:
    
      - The monetizer's login in the `bidder` parameter is correct: `adfox_%bidder-login%`.
      - IDs in the `params` parameter match the IDs that the monetizer passed to the publisher.
    
    For example:
    
    ![](../_images/monetization/integration-checking-1.png){style="border: solid 1px #cccccc; max-width=700px"}
    
1. Make sure that there are no errors in the request and the creative comes with a bid:
    
    - Run the following browser console command:

      ```javascript
      window.Ya.headerBidding.getBidsReceived()
      ```
    
    - Make sure that a creative with a bid is received for the login and the container from Step 1.
    
    For example:

    ![](../_images/monetization/integration-checking-2.png){style="border: solid 1px #cccccc; max-width=700px"}

1. Check the number of `containerId`.
    
    {% note alert %}
    
    You can specify **no more than ten** `containerId` per monetizer.
    
    {% endnote %}
    

### Enable custom targeting via Adfox HB {#targetings}

<!-- source: en/_includes/monetization/script-features/targetings-adfox.md -->
If a monetizer account that uses Adfox HB has [custom targeting](https://yandex.com/support/adfox/en/targeting/puid.md) set up, you need to add the `puidN` parameters and targeting values to the ad tag, where `N` is the characteristic number from 1 to 63. The `puid` parameters are added to the `params` object in `name: value` format, where:

- `name` is the parameter name (`puidN`).
- `value` is the parameter value.


{% cut "Example of a configuration script with a monetizer that uses Adfox HB and the added puid parameters" %}


```javascript
window.YaHeaderBiddingSettings = {
  biddersMap: { 'adfox_example': '957356' },
  adUnits: [{
    code: 'adfox_154875622348837699',
    bids: [{
      bidder: 'adfox_example',
      params: {
        pp: 'g',
        ps: 'cqmv',
        p2: 'fqnq',
        puid1: 'woman',
        puid2: '16:17:18:19',
        puid3: 'green'
      }
    }]
  }],
  timeout: 500
};
```


{% endcut %}
<!-- endsource: en/_includes/monetization/script-features/targetings-adfox.md -->


### Viewing statistics {#stat-view}

You can control your ad campaigns using the following reports:

- [Ad campaign reports](https://yandex.com/support/adfox/en/statistics/reports/index.md#create)
- [Placement reports](https://yandex.com/support/adfox/en/statistics/reports/index.md#create)


<!-- source: en/_includes/feedback.md -->
## Contact support


<a href="en/form"> <!--ссылка, куда ведет кнопка. Если внутренняя ссылка, пишем без .md и .html --> 
  <span class="button">Send an email</span> <!--текст на кнопке--> 
</a>



<!-- source: en/_includes/styles/button.md -->

<!-- endsource: en/_includes/styles/button.md -->
<!-- endsource: en/_includes/feedback.md -->
