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

# Third-party banner codes

## Surveys in banners {#iframe-banner}

You can use Adfox to place a survey from [Yandex Surveys](https://surveys.yandex.com/) or a form from [Yandex Forms](https://forms.yandex.com/) in a banner. Surveys can help you understand user behavior, test new ideas, and gauge the appeal of new product names or designs. You can also target survey banners to a specific audience.

To create a banner with a survey or form, use one of the following templates.

* Banner HTML5 [context].
* Fullscreen HTML5 [context].
* Code forwarding [context].

{% note info %}

Banner height adjusts with the survey content: If the window displaying the survey is smaller than the survey itself, a vertical scroll bar will appear.

Before adding a banner, first see how it looks and choose the optimal window size. To do that, you can use any online code editor with a preview feature.

{% endnote %}


To add a banner with a survey:

1. Choose the appropriate banner type and template.
1. Specify the banner's parameters, following the [requirements for the selected format](https://www.yandex.com/support/adfox/en/banners/specs/index.md).
1. Add the survey code to the **HTML5 code of the creative** field:

    {% list tabs %}

    - For surveys from Yandex Surveys

      Create a survey in the [Yandex Surveys](https://surveys.yandex.com/) interface and place a link to it within the `iframe` tag. To configure the window size, set the `width` and `height` parameters in pixels or percentages.

        Here's a sample code for embedding a survey from Yandex Surveys into the **Fullscreen HTML5 [context]** template:

        ```
        <iframe src="https://yandex.ru/poll/poll-id" width="100%" height="100%"></iframe>
        ```

    - For forms from Yandex Forms

      To learn how to get the form code, see [Help for Yandex Forms](https://yandex.ru/support/forms/ru/publish#publish-site).

    {% endlist %}

## Code for Adserving (ex. Sizmek) {#sizmek-code}

1. Template used: `Banner HTML5 [context]`.
1. Wrap the banner code in the `<html>` and `<body>` tags.
1. In the `
> </body>
> 
> </html>
> ```

## Weborama code {#weborama-code}

1. Template used: `Banner HTML5 [context]`.
1. Wrap the banner code in the `<html>` and `<body>` tags.
1. Add macros:
    
    - To the `random` parameter, add a randomizing `%system.random%` macro.
    - To the `clicktrackers` parameter, add a `%request.reference_mrc%` macro to track clicks.
    
1. If necessary, add links:
    
    - Add a link for tracking impressions to the `imptrackers` parameter.
    - Add a link for tracking clicks to the `publisherclick` parameter.

> A sample ad tag for Adfox:
> ```html
> <!DOCTYPE html>
> <html>
> <head>
>     <title></title>
> </head>
> <body>
> <div id="weborama" style="text-align:center;">
> 
> </div>
> </body>
> </html>
> ```


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