ES6 Publisher Mode Demo: gutefrage

This page contains the complete ad configuration


Integration

This code should be placed in the head of your page

<link rel="preconnect" href="https://securepubads.g.doubleclick.net" crossorigin="anonymous">
<link rel="preconnect" href="[[domain]]" crossorigin="anonymous">

<!-- sourcepoint CMP (required) -->
<script>
  !function () { var e = function () { var e, t = "__tcfapiLocator", a = [], n = window; for (; n;) { try { if (n.frames[t]) { e = n; break } } catch (e) { } if (n === window.top) break; n = n.parent } e || (!function e() { var a = n.document, r = !!n.frames[t]; if (!r) if (a.body) { var i = a.createElement("iframe"); i.style.cssText = "display:none", i.name = t, a.body.appendChild(i) } else setTimeout(e, 5); return !r }(), n.__tcfapi = function () { for (var e, t = arguments.length, n = new Array(t), r = 0; r < t; r++)n[r] = arguments[r]; if (!n.length) return a; if ("setGdprApplies" === n[0]) n.length > 3 && 2 === parseInt(n[1], 10) && "boolean" == typeof n[3] && (e = n[3], "function" == typeof n[2] && n[2]("set", !0)); else if ("ping" === n[0]) { var i = { gdprApplies: e, cmpLoaded: !1, cmpStatus: "stub" }; "function" == typeof n[2] && n[2](i) } else a.push(n) }, n.addEventListener("message", (function (e) { var t = "string" == typeof e.data, a = {}; try { a = t ? JSON.parse(e.data) : e.data } catch (e) { } var n = a.__tcfapiCall; n && window.__tcfapi(n.command, n.version, (function (a, r) { var i = { __tcfapiReturn: { returnValue: a, success: r, callId: n.callId } }; t && (i = JSON.stringify(i)), e.source.postMessage(i, "*") }), n.parameter) }), !1)) }; "undefined" != typeof module ? module.exports = e : e() }();
</script>
<script>
window._sp_ = {
    config: {
        accountId: 270,
        // every vertical except testfrage.net has a proper subdomain configured !
        baseEndpoint: 'https://consent.gutefrage.net'
    }
}
</script>
<script async src="https://consent.gutefrage.net/wrapperMessagingWithoutDetection.js"></script>
<!-- your ad tag -->
<script defer type="module" src="[[domain]]moli_62e254aeb8351106a2aa.min.mjs"></script>

Gutefrage uses the publisher mode. This test pages executes this additional javascript

window.moli = window.moli || {que: []};
window.moli.que.push(function (moliAdTag) {

    // dynamically set by gutefrage
    const vertical = 'gutefrage';
    const iabChannel = 'PersonalAndFinance';

    moliAdTag.addLabel(vertical);
    moliAdTag.addLabel(iabChannel);

    // required targeting - dynamically set by gutefrage
    // v2015 on PHP app
    moliAdTag.setTargeting('gfversion', ['v2016']);
    // array of normalized tags
    moliAdTag.setTargeting('tags', ['auto', 'waschmaschine']);
    // allows targeting for verticals
    moliAdTag.setTargeting('vertical', vertical);
    // marketing channel
    moliAdTag.setTargeting('channel', iabChannel);

    // allows targeting adult content
    moliAdTag.setTargeting('isAdultContent', 'false');
    // allows targeting for user agents
    moliAdTag.setTargeting('supportedUserAgent', 'true');

    // trigger ads
    moliAdTag.requestAds();
});

Privacy Manager


<button class="btn btn-secondary" onclick="window._sp_.loadPrivacyManagerModal(201642)">Privatsphäre</button>
                

Moli Console

You can get more details by opening the moli console.

Or if you are developer type this into the javascript console

moli.openConsole()

Ad Slots

gf_header

<div id="gf_header"></div>

gf_mobile_presenter

<div id="gf_mobile_presenter"></div>

gf_sidebar_left

<div id="gf_sidebar_left"></div>

gf_content_1

<div id="gf_content_1"></div>

gf_content_2

<div id="gf_content_2"></div>

This slot has passback support enabled. Creatives which require a passback need to trigger this in their creatives

<script>
var request = JSON.stringify({ type: 'passback', domId: 'gf_content_2' passbackOrigin: '[ADVERTISER]' });

window.passbackCallback = function() {
  try {
    window.top.postMessage(request, '*');
  } catch (_) {
    window.postMessage(request, '*');
  }
}
</script>

gf_content_3

<div id="gf_content_3"></div>

gf_content_4

<div id="gf_content_4"></div>

gf_content_5

<div id="gf_content_4"></div>

gf_content_x

<div id="gf_content_x"></div>

gf_sidebar_1

<div id="gf_sidebar_1"></div>

gf_sidebar_2

<div id="gf_sidebar_2"></div>

gf_floorad

<div id="gf_floorad"></div>

gf_wallpaper_pixel

<div id="gf_wallpaper_pixel"></div>

gf_stickyad

<div id="gf_stickyad"></div>