...
Code Block |
---|
<script data-cfasync="false" type="text/javascript"> window.snigelPubConf = { "adengine": { "activeAdUnits": ["topleaderboard", "sidebar"] } } </script> <script data-cfasync="false" async src="https://cdn.snigelweb.com/adengine/**site.domain**/loader.js" type="text/javascript"></script> |
Auction ads for the same unit in two different placement
Since the same ad unit is being auctioned twice for different placements, it's recommended to use the same gpIdUniquifier
—the original one—for both auctions if we have a article scrolling page. This ensures that SSPs are aware that it is indeed the same unit, allowing for better tracking and optimization.
Code Block |
---|
<script data-cfasync="false" type="text/javascript">
window.snigelPubConf = {
"adengine": {
"activeLots": [
{ placement: 'adngin-sidebar-0', adUnit: 'sidebar', gpIdUniquifier: 'adngin-sidebar-0' },
{ placement: 'adngin-sidebar-1', adUnit: 'sidebar', gpIdUniquifier: 'adngin-sidebar-0' }
]
}
}
</script>
<script data-cfasync="false" async src="https://cdn.snigelweb.com/adengine/**site.domain**/loader.js" type="text/javascript"></script> |
Note |
---|
|
Auction ads for AdEngine and GPT ad-units
...
Code Block |
---|
<script data-cfasync="false" type="text/javascript"> window.snigelPubConf = { "adengine": { "activeAdUnits": ["topleaderboard"], "targeting": { "pbjs": { "specialization": "liver" //only used by doceree } } } } </script> <script data-cfasync="false" async src="https://cdn.snigelweb.com/adengine/**site.domain**/loader.js" type="text/javascript"></script> |
...
Code Block |
---|
if(window.adngin && window.adngin.adnginLoaderReady) {
// When adnginLoaderReady boolean is true, it is safe to access command queues like adngin.queue or googletag.queue
adngin.queue.push(function() {
adngin.cmd.startAuction();
});
}); |
It is important to always use either the event adnginLoaderReady
or the boolean adngin.adnginLoaderReady
to safely call AdEngine. The two methods could be combined like shown in the following example:
...