Skip to content

Instantly share code, notes, and snippets.

@bensojona
Created March 18, 2015 01:19
Show Gist options
  • Save bensojona/0309cd328b922ed64a06 to your computer and use it in GitHub Desktop.
Save bensojona/0309cd328b922ed64a06 to your computer and use it in GitHub Desktop.
<script src="mraid.js"></script>
<div class="celtra-ad-v3">
<img src="data:image/png,celtra" style="display: none" onerror="
(function(img) {
var params = {'clickUrl':'','clickEvent':'advertiser','externalAdServer':'Custom'};
var req = document.createElement('script');
req.id = params.scriptId = 'celtra-script-' + (window.celtraScriptIndex = (window.celtraScriptIndex||0)+1);
params.clientTimestamp = new Date/1000;
var src = (window.location.protocol == 'https:' ? 'https' : 'http') + '://ads.celtra.com/de46502e/mraid-ad.js?';
for (var k in params) {
src += '&amp;' + encodeURIComponent(k) + '=' + encodeURIComponent(params[k]);
}
req.src = src;
img.parentNode.insertBefore(req, img.nextSibling);
})(this);
"/>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment