DIV Ad Provider Implementation
6 min
The ad provider called "DIV" allows customers to configure advertisements using a simple HTML div element approach while maintaining consistency with the existing ad system.
Implementation Details
Core Functionality
Simple Div Container
- The DIV ad provider creates a basic HTML <div> element on the webpage
- This div serves as a container where ad scripts can inject their content
Flexible Attributes
- Publishers can configure custom attributes for the div element through the builder
- These attributes (like id, class, data-* attributes) are automatically applied to the div when it renders on the page
- This flexibility allows ad providers like Ökotest to use their existing scripts that expect specific div attributes
Consistent Integration
- The DIV provider follows the same patterns as other ad providers (GPT, HTML, Traffective, etc.)
- It uses the same configuration system and loads through the same ad component
Usage Example
Configuration
In the Experience builder, project can configure a DIV ad unit with:
- Type: DIV
- Attributes: Custom key-value pairs for HTML attributes
Example Configuration
{
"type": "DIV",
"attributes": {
"id": "ad-slot",
"class": "ad-container",
"data-zone": "123",
"data-size": "300x250"
}
}Rendered Output
<div id="oeko-ad-slot" class="ad-container" data-zone="123" data-size="300x250"></div>