Get the ad tag
Ad tags from the site level
When using ad tags from the site level, the Adfox interface creates a logical structure of your site that includes site sections and placement names in each section.
Sections have page templates that describe the range of URLs included in this section.
You need to get the ad tag and install it on all site pages. When a banner is requested, the server compares the address of the site page with the section templates, choosing the appropriate section and placement.
The Adfox interface lets you check what section of the site in Adfox a particular page will belong to.
Ad tags from the placement level
When using ad tags from the placement, you decide where each placement from any section is on the site (this scheme is used when it's difficult or impossible to set page templates for sections).
You set the logical structure of your site in the interface (sections and placements). Then, you take the tags from the placement level in each site section and manually install these tags in the appropriate places in your real site sections.
Leave the Allowed page URLs and Excluded page URLs boxes blank.
To enable getting ad tags from the placement level, contact support.
Learn more about working with an ad tag from the site level.
Container requirements for the ad tag
For the ad to be called correctly, the container must meet the following conditions:
The container or its parent elements can't have a
display:nonestyle, otherwise, the context.js library can't determine its size.
You can measure the container and parent element size.
Note: if the parent element has a size set, but there are several nested elements without a size inside it, the container size is defined as 0 × 0. In this case, set the container size using the
max-height) attributes and ensure that all nested elements have their size specified.
- Before sending an ad request, the context.js library analyzes the size of the container with the ad tag. The request is sent only if the container size can be measured.
- If the container couldn't be measured, the context.js library sends a
CONTAINER_IS_HIDDENerror to the browser console and waits for:
DOM (Document Object Model) to be completed.
Styles with sizes to be applied to the container.
After that, a request is sent to the server.