---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/support/adfox/en/banners/specs/adfox-code-transfer.md
  - https://yandex.com/support/adfox/ru/banners/specs/adfox-code-transfer.md
  - href: en/banners/specs/adfox-code-transfer.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

# Adfox code forwarding

## Description {#description4}

With Adfox code forwarding, you can install the Adfox ad tag in the banner or the default banner. The tag (code) will be executed on the page without re-initiating the context.js library, which significantly reduces the time before the banner is displayed.

Format features:

- Viewability check works for the banner that will eventually be displayed on the site.
- Click statistics for the **Adfox code forwarding [context]** banner aren't taken into account.

We recommend using the [Code forwarding](https://yandex.com/support/adfox/en/banners/specs/code-transfer.md#clicksrequirements) template to forward HTML5 code or embed codes of third-party systems.


## Adfox tag requirements {#coderequirements2}

1. The original view of the ad code:

    ```html
    <!--In the site <head>, add the loader code once-->
    
    
                
    <!--Adfox START-->
    <div id="adfox_149487961538858600"></div>
    
    ```
    
1. Copy the embed code parameters inside the parentheses in the form of an object. For example:
    ```javascript
    {
        ownerId: 168627,
        containerId: 'adfox_149487961538858600',
        params:{
            p1: 'bwfgn',
            p2: 'ekwx',
            pfc: 'bmtev',
            pfb: 'eokcn'
        }
    }
    ```
    
    Object properties can include: `ownerId`, `params`, `customDomain`.
    
    If no property is specified, the property from the embed code object of the previous request is used.
    


## Add a banner {#addbanner4}

To add a banner with the Adfox tag, use the **Adfox code forwarding [context]** template. If this template is missing from the banner type list, [add it from the preset](https://yandex.com/support/adfox/en/ad-inventory/settings/template.md#predefined-template).

When adding a banner, specify the parameters:

- **Tracking pixel link**: Adfox pixel is used by default `//banners.adfox.ru/transparent.gif`. If you need to keep track of impressions in an external system, delete the Adfox pixel and specify another link.
    
- **Re-request code parameters**: Insert the [Adfox ad tag parameters](#coderequirements2).
    
    Please note that when the banner is saved, the parameters of the re-request code will be wrapped in quotation marks in a special way. That is necessary for the code to work properly. Don't change the resulting code after saving the banner.
    
- **Name of the banner container class attribute**: If necessary, enter a name (or multiple names separated by a space) for the `class` attribute of the banner container.
    

Example of placing a banner with the Adfox ad tag:

![](../../_images/banners/banner.reset-3.png =500x){style="border: solid 1px #cccccc; max-width=500px"}


{% note info %}

[Ad labeling](https://yandex.com/support/adfox/en/labeling/about.md) must be performed by the ad tag being forwarded.

{% endnote %}



## Add a default banner {#defoltbanner4}

1. To add a default banner with the Adfox code, [use the code generator](https://yandex.ru/promo/yan/adfox-specs/default-generator/index_en).
1. Select the code type that you place in the default banner.
1. Add tracking pixels if necessary.
1. Copy the ad tag and paste it in the **Code** field with the **JavaScript** type.

Example of placing a backup ad with the Adfox ad tag:

![](../../_images/banners/default.reset.png =500x){style="border: solid 1px #cccccc; max-width=500px"}


<!-- 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 -->
