Created
August 14, 2019 10:24
-
-
Save spormeon/d76033d6db324cfd7f3f0bab728aeaa4 to your computer and use it in GitHub Desktop.
normal and native code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NORMAL BANNER AND OUTSTREAM VIDEO CODE// | |
<script src = "https://adops.adysis.com/prebid_universal_creative.js"></script> | |
<script> | |
var ucTagData = {}; | |
ucTagData.adServerDomain = ""; | |
ucTagData.pubUrl = "%%PATTERN:url%%"; | |
ucTagData.targetingMap = %%PATTERN:TARGETINGMAP%%; | |
ucTagData.hbPb = "%%PATTERN:hb_pb%%"; | |
try { | |
ucTag.renderAd(document, ucTagData); | |
} catch (e) { | |
console.log(e); | |
} | |
</script> | |
//NATIVE STYLE WHERE HAVE TO PUT CODE// | |
<div id="native-ad" class="pb-click" pbadid="%%PATTERN:hb_adid%%"> | |
<a id="lien03457" href="%%CLICK_URL_UNESC%%%%PATTERN:hb_native_linkurl%%" target="_blank"> | |
<div class="native-content"> | |
<div class="image" style="background-image: url("%%PATTERN:hb_native_image%%");"></div> | |
<div class="attribution inset-box"> | |
<div class="inset-box-text">Ad</div> | |
</div> | |
<div class="advertiser inset-box"> | |
<p class="inset-box-text"> %%PATTERN:hb_native_brand%%</p> | |
</div> | |
<div class="title"> | |
%%PATTERN:hb_native_title%% | |
</div> | |
<p class="call-to-action" style="overflow-wrap: break-word;">Learn More</p> | |
</div> | |
</a> | |
</div> | |
<script src="https://cdn.jsdelivr.net/npm/prebid-universal-creative@latest/dist/native-trk.js"></script> | |
<script> | |
let pbNativeTagData = {}; | |
pbNativeTagData.pubUrl = "%%PATTERN:url%%"; | |
window.pbNativeTag.startTrackers(pbNativeTagData); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment