Campaign
How do I implement a responsive ad unit?
Responsive ad units automatically adapt to different screen sizes, making them particularly suitable for modern, mobile-optimised websites.

How it works
The creative is loaded within an iframe at the location on your website where you position our integration code or the placeholder HTML container. The number and design of the ads can be freely configured by you via the ad block layout form in the publisher front end.
Unlike static ads, however, it is important that the surrounding HTML container has correct height and width specifications, as our advertisements dynamically adapt to them later. Responsive ads are therefore particularly suitable for websites that are optimised for different screen sizes.
If the size of the surrounding HTML container is not sufficient for the advertisements to fit with their originally configured design, our responsive logic will automatically attempt to modify them accordingly:
Texts or elements are scaled down
Individual elements are hidden (e.g. ad link, button or image)
Ads are rearranged within the ad block
Integration methods
There are two ways to integrate responsive ads on your website.
Unlike static ads, it is important for responsive ads that the surrounding HTML container always has correct height and width specifications, as our advertisements align accordingly later!
Asynchronous (Recommended)
Thanks to asynchronous integration, your website loads independently of our ad request. First, you place the desired HTML containers at the positions on your website where advertisements should appear. The containers must have a unique ID and correct height and width specifications. Our delivery API is then loaded once and asynchronously using a dynamic <script> tag. As soon as the API has finished loading, a global callback function is executed in which the actual integration logic is stored.
This type of integration is particularly suitable if you want to place multiple AdUp creatives on your page. By programmatically defining the ad blocks, various events are also available here to which you can react accordingly (e.g. "onClick" or "onNoAds").
Synchronous
With synchronous integration, a <div> tag with the desired width and height specifications is first placed at the location on your website where the creative should appear. A <script> tag with the corresponding URL parameters is placed within the <div> tag. When your website loads, the script is then automatically (synchronously) executed and creates an iframe with our advertisements at the corresponding position.
This is the simplest way to integrate AdUp creatives. However, unlike asynchronous integration, not all options are available here due to defining the ad block via URL parameters.
Required parameters
Name | Description | Example |
|---|---|---|
placementkey | The unique placement key of your ad block. | Asynchronous (programmatic) Synchronous (URL parameter) |
responsive | Enables/disables the responsive ads feature for the ad block. Note: For "static ads" in the asynchronous integration, the parameter must always be set to "false"! | Asynchronous (programmatic) Synchronous (URL parameter) |
Optional parameters
Name | Description | Example |
|---|---|---|
query | Keywords by which the ads should be filtered. Multiple keywords can be separated by a semicolon. | Asynchronous (programmatic) Synchronous (URL parameter) |
mincpc | This is the minimum price you want to earn for a click. In general, the lower the minimum price, the more campaigns are submitted to you and the more money you can earn due to greater competition on the position. | Asynchronous (programmatic) Synchronous (URL parameter) |
pageurl | The current URL of the page on which the ad is served. Should always be set if our creative is integrated within one or more nested iframes on your page, as in some circumstances the URL can then no longer be determined by us. | Asynchronous (programmatic) Synchronous (URL parameter) |
skip | Number of ads to be skipped during delivery. Useful when you place multiple creatives on one page. | Asynchronous (programmatic) Synchronous (URL parameter) |
lazy | Enables the "lazy loading" feature. This means that the creative is only loaded (and thus the impression is only tracked) as soon as it enters the visible area of the page for the user. | Asynchronous (programmatic) Synchronous (URL parameter) |
lazyoffset | By default, with "lazy loading", our creatives are only displayed once they are visible to the user. Using the "lazyoffset" option, you also have the possibility to define an offset (in pixels). This allows our creatives to load slightly earlier, as soon as they are "near" the visible area. | Asynchronous (programmatic) Synchronous (URL parameter) |
placeholdervalues | Values for dynamic ad placeholders can be passed here. | Asynchronous (programmatic) Synchronous (URL parameter) |
flyin | Enables the "fly-in ads" feature for the ad block. Further information and options for this can be found in the documentation on fly-in ads. | Asynchronous (programmatic) Synchronous (URL parameter) |
adtest | Impressions and clicks are not tracked when enabled. Should only be used for testing purposes! | Asynchronous (programmatic) Synchronous (URL parameter) |
gdpr gdpr_consent | Normally, we determine the required GDPR data automatically via the TCF API implemented on the website. Should this not be available, or should it not be possible to use it for technical reasons, you have the option here to pass the GDPR data manually. gdpr true or 1 = GDPR applies false or 0 = GDPR does not apply null or (omitted) = Unknown (default) gdpr_consent The IAB consent string (base64url-encoded) | Asynchronous (programmatic) Synchronous (URL parameter) |
Events / Callbacks
Name | Description | Example |
|---|---|---|
onClick | Is automatically called as soon as an advertisement has been clicked. The first (and only) parameter returned is the rank of the ad within the creative. | Asynchronous (programmatic) Synchronous (URL parameter) |
onResize | Is automatically called as soon as the size of the creative changes (e.g. for advertorial ads). The first parameter returned is the new width and the second parameter is the new height. | Asynchronous (programmatic) Synchronous (URL parameter) |
onAds | Is automatically called as soon as the creative has been loaded successfully. The first (and only) parameter returned is the container ID. | Asynchronous (programmatic) Synchronous (URL parameter) |
onNoAds | Is automatically called as soon as the creative could not be delivered. The first (and only) parameter returned is the container ID. | Asynchronous (programmatic) Synchronous (URL parameter) |
Troubleshooting
The responsive creative is too small, too large, is not displayed or overlaps other elements.
The HTML container does not have explicit size specifications, but these are required
There are other elements inside the HTML container in addition to the script tag
Fewer ads are served via responsive ads than via static ads, or the number of ads does not match.
The "Integration method" in the ad block layout form was not set to "Responsive Ads"
The "Number of ads" in the ad block layout form was not configured correctly
The responsive advertisements are not displayed correctly in mobile browsers (smartphones/tablets).
To ensure that our "responsive ads" are also legible in mobile browsers, it is necessary that the "viewport" meta tag is correctly set on your website
The layout of the advertisements (rows/columns) does not match the preconfigured layout.
The responsive logic decides for itself which layout fits best based on the current size of the HTML container and always attempts to display the layout with the largest font size and the largest ad image (if available)
The displayed font size does not match the preconfigured font size
The font size is automatically scaled down as soon as the advertisement with the configured font size does not fit into the given HTML container
To ensure that our "responsive ads" are also legible in mobile browsers, it is necessary that the "viewport" meta tag is correctly set on your website
The ad images are too small or do not fill the available space
Depending on the selected layout, the ad images always scale proportionally with the height or width of the advertisement, whereby the aspect ratio is always maintained
However, the ad images are never scaled larger than the (maximum) image size preconfigured in the ad block layout form
Ad images, texts or links are not displayed
If the HTML container is so small that even scaling down the texts is not sufficient to display the advertisement properly, our responsive logic will attempt in a final step to hide individual elements (link, text, button or ad image) to save space
In this case, the layout of your ad block should generally be designed to be more space-saving (e.g. smaller font sizes or margins)
