Simple example of an asynchronous integration
Completely sufficient if the integration code is only to be placed in a single location on your page.
Step 1
First, create the <div> containers with unique IDs in those locations within the <body> section of your website where the advertisements should be loaded.
<div id="adup1"></div>
<div id="adup2"></div>
<div id="adup1"></div>
<div id="adup2"></div>
<div id="adup1"></div>
<div id="adup2"></div>
Step 2
Load our delivery API and initialise the callback “window.uAd_init” once at the end of your page. Within the callback, you now have the option to configure the advertising materials using the “window.uAd.embed” method and the desired parameters.
<script type="text/javascript">
window.uAd_init = function() {
window.uAd.embed("adup1", {
placementkey: "b438218268aff398aa44332004a8d78a",
responsive: false,
query: "Italien"
});
window.uAd.embed("adup2", {
placementkey: "c826aad8837fe2bd34f4aadde2cb222f",
responsive: false,
mincpc: 1.15,
lazy: true
});
};
if (typeof window.uAd === "object") window.uAd_init();
else (function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "https://s.d.adup-tech.com/jsapi";
g.async = true;
s.parentNode.insertBefore(g, s);
}(document, "script"));
</script><script type="text/javascript">
window.uAd_init = function() {
window.uAd.embed("adup1", {
placementkey: "b438218268aff398aa44332004a8d78a",
responsive: false,
query: "Italien"
});
window.uAd.embed("adup2", {
placementkey: "c826aad8837fe2bd34f4aadde2cb222f",
responsive: false,
mincpc: 1.15,
lazy: true
});
};
if (typeof window.uAd === "object") window.uAd_init();
else (function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "https://s.d.adup-tech.com/jsapi";
g.async = true;
s.parentNode.insertBefore(g, s);
}(document, "script"));
</script><script type="text/javascript">
window.uAd_init = function() {
window.uAd.embed("adup1", {
placementkey: "b438218268aff398aa44332004a8d78a",
responsive: false,
query: "Italien"
});
window.uAd.embed("adup2", {
placementkey: "c826aad8837fe2bd34f4aadde2cb222f",
responsive: false,
mincpc: 1.15,
lazy: true
});
};
if (typeof window.uAd === "object") window.uAd_init();
else (function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "https://s.d.adup-tech.com/jsapi";
g.async = true;
s.parentNode.insertBefore(g, s);
}(document, "script"));
</script>
Advanced example of an asynchronous integration
Here, the logic from the simple example (above) is outsourced to a function named “adup”. This ensures that our delivery API is only loaded once. A callback function with your desired integration logic is passed as a parameter, which is automatically executed as soon as the API is ready. This is particularly useful if, for example, you have placed multiple advertising materials in different locations on your page and/or advertising materials are only to be placed on your page during runtime.
Step 1
Place the following code in the <head> section of your website.
<script type="text/javascript">
function onAdupReady(callback) {
if (window.uAd) {
callback();
} else if (window.uAd_init) {
var oldCallback = window.uAd_init;
window.uAd_init = function() {
oldCallback();
callback();
};
} else {
window.uAd_init = callback;
(function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "https://s.d.adup-tech.com/jsapi";
g.async = true;
s.parentNode.insertBefore(g, s);
}(document, "script"));
}
}
</script><script type="text/javascript">
function onAdupReady(callback) {
if (window.uAd) {
callback();
} else if (window.uAd_init) {
var oldCallback = window.uAd_init;
window.uAd_init = function() {
oldCallback();
callback();
};
} else {
window.uAd_init = callback;
(function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "https://s.d.adup-tech.com/jsapi";
g.async = true;
s.parentNode.insertBefore(g, s);
}(document, "script"));
}
}
</script><script type="text/javascript">
function onAdupReady(callback) {
if (window.uAd) {
callback();
} else if (window.uAd_init) {
var oldCallback = window.uAd_init;
window.uAd_init = function() {
oldCallback();
callback();
};
} else {
window.uAd_init = callback;
(function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "https://s.d.adup-tech.com/jsapi";
g.async = true;
s.parentNode.insertBefore(g, s);
}(document, "script"));
}
}
</script>Step 2
Place the <div> containers with unique IDs in those locations within the <body> section of your website where the advertisements should be loaded, and then integrate them using the global function “adup” and the desired parameters.
<div id="adup1"></div>
<script type="text/javascript">
onAdupReady(function() {
window.uAd.embed("adup1", {
placementkey: "b438218268aff398aa44332004a8d78a",
responsive: false,
query: "Italien"
});
});
</script>
<div id="adup2"></div>
<script type="text/javascript">
onAdupReady(function() {
window.uAd.embed("adup2", {
placementkey: "c826aad8837fe2bd34f4aadde2cb222f",
responsive: false,
mincpc: 1.15,
lazy: true
});
});
</script><div id="adup1"></div>
<script type="text/javascript">
onAdupReady(function() {
window.uAd.embed("adup1", {
placementkey: "b438218268aff398aa44332004a8d78a",
responsive: false,
query: "Italien"
});
});
</script>
<div id="adup2"></div>
<script type="text/javascript">
onAdupReady(function() {
window.uAd.embed("adup2", {
placementkey: "c826aad8837fe2bd34f4aadde2cb222f",
responsive: false,
mincpc: 1.15,
lazy: true
});
});
</script><div id="adup1"></div>
<script type="text/javascript">
onAdupReady(function() {
window.uAd.embed("adup1", {
placementkey: "b438218268aff398aa44332004a8d78a",
responsive: false,
query: "Italien"
});
});
</script>
<div id="adup2"></div>
<script type="text/javascript">
onAdupReady(function() {
window.uAd.embed("adup2", {
placementkey: "c826aad8837fe2bd34f4aadde2cb222f",
responsive: false,
mincpc: 1.15,
lazy: true
});
});
</script>
Example of a synchronous integration
Insert the <script> tags with the desired URL parameters in those locations within the <body> section on your page where the advertising materials should be displayed.
<script type="text/javascript"
src="https://s.d.adup-tech.com/ads/display.js?placementkey=ee3f328127873b8fc0174d84b235087b&query=Fl%C3%BCge;USA">
</script>
<script type="text/javascript"
src="https://s.d.adup-tech.com/ads/display.js?placementkey=058c43c27f6f563e09ddde3c26b54042&query=Fl%C3%BCge;USA&lazy=1&skip=5">
</script><script type="text/javascript"
src="https://s.d.adup-tech.com/ads/display.js?placementkey=ee3f328127873b8fc0174d84b235087b&query=Fl%C3%BCge;USA">
</script>
<script type="text/javascript"
src="https://s.d.adup-tech.com/ads/display.js?placementkey=058c43c27f6f563e09ddde3c26b54042&query=Fl%C3%BCge;USA&lazy=1&skip=5">
</script><script type="text/javascript"
src="https://s.d.adup-tech.com/ads/display.js?placementkey=ee3f328127873b8fc0174d84b235087b&query=Fl%C3%BCge;USA">
</script>
<script type="text/javascript"
src="https://s.d.adup-tech.com/ads/display.js?placementkey=058c43c27f6f563e09ddde3c26b54042&query=Fl%C3%BCge;USA&lazy=1&skip=5">
</script>