<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
/*
// -----------------------------------------
// ID: 07eeafdc-0bd6-4334-be8e-d5b7982d1000
// Campanha: Sesc Todo Dia
// Agência: Calix
// Cliente: Sesc
// Canal: AS ABCDE 18+ ANOS | NACIONAL
// Veículo: Go On
// Criativo: 300x250-STANDARD-html-150-kb
// Linha Criativa: DENTISTA
// Região: AC,AL,AP,AM,BA,CE,DF,ES,GO,MA,MT,MS,MG,PA,PB,PR,PE,PI,RJ,RN,RS,RO,RR,SC,SP,SE,TO
// Data da Veiculação: 13/09/2024 - 13/10/2024
// -----------------------------------------
// Abaixo segue o material para consumo:
*/
</script>
<!--<script src="https://sdk.adftech.com.br/sdk.js" type="text/javascript"></script>-->
<script type="text/javascript">
!function() {
function i() {
try {
return window.top.location.toString()
} catch {
return document.referrer
}
}
function t() {
console.log("AD POWERED BY AD FORCE"),
this.version = "1.0.0",
this.options = {
baseUrl: "https://api.adftech.com.br",
creativeMetadata: null,
getEventUrl: null,
container: null,
iframe: null,
iframeWrapper: null,
creativeUuid: null,
extension: null,
size: {
width: 0,
height: 0,
expandedWidth: 0,
expandedHeight: 0
},
isExpandable: !1,
cacheBusterMacro: null,
clickMacro: null,
referrerUrlMacro: null
},
this.options.getEventUrl = function(t) {
var e = i(),
t = new URL(this.options.baseUrl + "/creative/" + this.options.creativeUuid + "/events/" + t),
e = (t.searchParams.set("ref", encodeURIComponent(e)),
t.searchParams.set("t", Date.now()),
this.options.cacheBusterMacro && "%%CACHEBUSTER%%" !== this.options.cacheBusterMacro && t.searchParams.set("t", this.options.cacheBusterMacro),
this.options.referrerUrlMacro && 0 <= this.options.referrerUrlMacro.indexOf("http") && t.searchParams.set("ref", this.options.referrerUrlMacro),
new Image);
e.crossOrigin = "anonymous",
e.src = t.toString()
}.bind(this);
}
t.prototype._getAdMetadata = function() {
var t = i(),
s = this.options.baseUrl + "/creative/" + this.options.creativeUuid + "/tag?ref=" + t;
return new Promise(function(i, o) {
var t, e, n, r;
t = "GET",
e = s,
n = function(t, e) {
if (t)
return o(t);
i(JSON.parse(e))
},
(r = new XMLHttpRequest).open(t, e, !0),
r.setRequestHeader("Content-Type", "application/json"),
r.setRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate"),
r.setRequestHeader("Expires", "0"),
r.onreadystatechange = function() {
4 === r.readyState && (200 <= r.status && r.status < 300 ? n(null, r.responseText) : n(new Error("HTTP request failed with status " + r.status)))
},
r.onerror = function() {
n(new Error("Network error occurred"))
},
r.send()
});
};
// Alteração para adicionar a macro de clique personalizada
t.prototype.withClickMacro = function(t) {
// Adiciona o clickMacro com a URL no formato desejado
this.options.clickMacro = t ? 'http://www.google.com?rd_url=' + t : null;
return this;
};
t.prototype.withExtension = function(t) {
return this.options.extension = new t(this.options),
this;
};
t.prototype.withSize = function(t) {
return this.options.size = Object.assign(this.options.size, t),
this.options.size.expandedWidth && this.options.size.expandedHeight && (this.options.isExpandable = !0),
this;
};
t.prototype.withContainer = function(t) {
t = "object" == typeof t ? t : document.querySelector(t);
return t && (this.options.container = t),
this;
};
t.prototype.withCreative = function(t) {
return this.options.creativeUuid = t,
this;
};
t.prototype.withCacheBusterMacro = function(t) {
return this.options.cacheBusterMacro = t,
this;
};
t.prototype.withReferrerUrlMacro = function(t) {
return this.options.referrerUrlMacro = t,
this;
};
t.prototype._iframeInit = function() {
this.options.extension && this.options.extension.init();
};
t.prototype.build = function() {
this.options.container || this.withContainer(document.currentScript.parentElement),
this.options.container.style.width = this.options.size.width,
this.options.container.style.height = this.options.size.height,
this.options.container.style.margin = "0 auto",
this._getAdMetadata().then(function(t) {
this.options.creativeMetadata = t,
this.options.iframe = document.createElement("iframe"),
this.options.iframe.id = "adf-creative-iframe/" + this.options.creativeUuid,
this.options.iframe.setAttribute("creative", this.options.creativeUuid),
this.options.iframe.width = this.options.size.width,
this.options.iframe.height = this.options.size.height,
this.options.iframe.scrolling = "no",
this.options.iframe.frameBorder = "0",
this.options.iframe.tabIndex = 0,
this.options.iframe.ariaLabel = "Advertisement",
this.options.iframe.style.cssText = "position: relative; border: none; overflow: hidden; vertical-align: bottom;",
this.options.iframe.addEventListener("load", this._iframeInit.bind(this)),
this.options.iframe.src = t.media,
this.options.iframeWrapper = document.createElement("div"),
this.options.iframeWrapper.style.cssText = "position: relative; display:inline-block; clear: both;",
this.options.iframeWrapper.style.width = this.options.size.width,
this.options.iframeWrapper.style.height = this.options.size.height,
this.options.iframeWrapper.appendChild(this.options.iframe),
this.options.container.appendChild(this.options.iframeWrapper)
}.bind(this));
};
window.AdSDK = window.AdSDK || t;
}();
</script>
<script src="https://sdk.adftech.com.br/sdk-standard-extension.js" type="text/javascript"></script>
<script type="text/javascript">
new AdSDK()
.withExtension(AdSDKExtension.STANDARD)
.withSize({"width":"300px","height":"250px"})
.withCreative('07eeafdc-0bd6-4334-be8e-d5b7982d1000')
.withCacheBusterMacro('${CACHEBUSTER}')
.withClickMacro('${CLICK_URL}')
.withReferrerUrlMacro('%%REFERRER_URL_ESC%%')
.build();
</script>
</body>
</html>
23
4
85KB
120KB
801.0ms
ms
801.0ms