For your convenience, there is a placement creation tool located on your site entry in the panel.
Below is an example implementation for a placement generated using our setup tool.
<div id="placement-1"></div>
<script>
window['nitroAds'].createAd('placement-1', {
"sizes": [
[
"728",
"90"
],
[
"970",
"90"
],
[
"300",
"250"
],
[
"970",
"250"
]
],
"report": {
"enabled": true,
"icon": true,
"wording": "Report Ad",
"position": "top-right"
}
});
</script>
The first parameter of the createAd
api must match a DOM element id on the page. Use a unique element id for every ad placement on your page to avoid common implementation issues. We suggest using a human readable static id for each unique placement for your report building and tracking purposes in the panel.
The second parameter is an object with the ad’s configuration (see: API reference).
To create a video placement you must select your site from the drop down list at the top of the builder. The format of the createAd call is similar – it utilizes the “format” API config to specify what type of video player to load. We recommend using the code generator until you are familiar with the different ad formats (which you can see descriptions of here).
<script>
window['nitroAds'].createAd('video-example', {
"format": "floating"
});
</script>