This page contains the complete ad configuration
This code should be placed in the head of your page
<!-- google ad manager tag (required) -->
<script async="async" src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<!-- faktor.io tag (required) -->
<script async src="https://config-prod.choice.faktor.io/d1d6c313-dbdd-494d-b51d-868ed4cd55b3/faktor.js"></script>
<!-- your ad tag -->
<script async="async" src="{{domain}}moli_c5575ddb7ec330110d3f.js"></script>
Next you need to request ads. Before you do that you can set additional targeting information. See the API Summary for a inclusive list of functions The code snippet above demonstrates on how to set iab channels and sub channels.
<!-- place this whereever you want -->
<script>
// initialize the command queue
window.moli = window.moli || { que: [] };
window.moli.que.push(function(moliAdTag) {
// set iab main channel - replace iabMainChannel with whatever logic you have to retrieve this
if (iabMainChannel) {
moliAdTag.setTargeting('channel', iabMainChannel);
}
// set iab sub channel - replace iabSubChannel with whatever logic you have to retrieve this
if (iabSubChannel) {
moliAdTag.setTargeting('subChannel', iabSubChannel);
}
// set push notifications key-value
moliAdTag.setTargeting('fm_push', 'true');
// trigger floor ad only if there's no newsletter popup
if (window.document.cookie.indexOf("mobile_nl_form=") >= 0) {
moliAdTag.addLabel('ShowFloorAd');
}
// trigger ads
moliAdTag.requestAds();
});
</script>>
Additionally to faktor.io skript integrated in the head of your page, place this button on your page to open the faktor.io user interface.
<script src="https://config-prod.choice.faktor.io/d1d6c313-dbdd-494d-b51d-868ed4cd55b3/faktor.js"></script>
<button type="button" onclick="__cmp('showConsentTool', true, function(data) {console.log(data)});" class="Button Button--flatBlue Button--small">Datenschutz Einstellungen öffnen></button>
You can get more details by opening the moli console.
enable ad tag console logs enable prebid console logs enable test mode enable fm_push key-valueOr if you are developer type this into the javascript console
moli.openConsole()
This ad is only activated if the ShowFloorAd
label is present. The label is being added if
the mobile_nl_form
cookie is present.
You can force a test ad by opening this page http://pre.ads.justpremium.com/?test=pu which sets a short time cooke that forces a just premium response.