Skip to content

Instantly share code, notes, and snippets.

@Piioo
Last active August 29, 2015 14:01
Show Gist options
  • Save Piioo/9c85c152e6e038081001 to your computer and use it in GitHub Desktop.
Save Piioo/9c85c152e6e038081001 to your computer and use it in GitHub Desktop.
<script type='text/javascript'>
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
(function () {
var gads = document.createElement('script');
gads.async = true;
gads.type = 'text/javascript';
var useSSL = 'https:' == document.location.protocol;
gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
var node = document.getElementsByTagName('script')[0];
node.parentNode.insertBefore(gads, node);
})();
</script>
<h2>DoubleClick Demo</h2>
</br>
<!-- Ad presentation -->
Ad :
<div id='ad-div' style='width:300px; height:250px;'>
<script type='text/javascript'>
googletag.cmd.push(function () {
googletag.defineSlot('/34718213/Gigya_demo_ad', [300, 250], 'ad-div').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
googletag.cmd.push(function () { googletag.display('ad-div'); });
</script>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment