Skip to content

Instantly share code, notes, and snippets.

@caedmonjudd
Created December 1, 2016 20:08
Show Gist options
  • Save caedmonjudd/376c8c746eabd0295c0eb50d45d21982 to your computer and use it in GitHub Desktop.
Save caedmonjudd/376c8c746eabd0295c0eb50d45d21982 to your computer and use it in GitHub Desktop.
Side rail updates
<script>
googletag.cmd.push(function() {
var bannerMapping = googletag.sizeMapping().
addSize([1050, 500], [[970, 120], [970, 90], [728, 90]]).
addSize([320, 400], [[320,50], [320, 100]]). //iphone 4 etc
addSize([550, 300], [[320, 50], [320, 100]]). //iphone 6 plus etc
addSize([600, 250], [[320, 50], [320, 100]]). //droid turbo, nexus 6 etc
build();
var railMapping = googletag.sizeMapping().
addSize([1050, 500], [[300, 250], [300, 600]]).
addSize([320, 400], [[300, 250], [300, 600]]).
build();
googletag.defineSlot('/83332100/Blog_RectangleTop', [[300, 600], [300, 250]], 'div-gpt-ad-1479909427189-0').defineSizeMapping(railMapping).addService(googletag.pubads());
googletag.defineSlot('/83332100/Blog_RectangleLower', [[300, 250], [300, 600]], 'div-gpt-ad-1479909513185-0').defineSizeMapping(railMapping).addService(googletag.pubads());
googletag.defineSlot('/83332100/Blog_Nav', [[970, 125], [728, 90], [970, 90], [970, 120]], 'div-gpt-ad-1479909563527-0').defineSizeMapping(bannerMapping).addService(googletag.pubads());
googletag.defineSlot('/83332100/Blog_Footer_Inner', [[728, 90], [970, 120], [970, 90], [970, 125]], 'div-gpt-ad-1480437454408-0').defineSizeMapping(bannerMapping).addService(googletag.pubads());
googletag.defineSlot('/83332100/Blog_Bottom', [[970, 125], [728, 90], [970, 120], [970, 90]], 'div-gpt-ad-1479909620043-0').defineSizeMapping(bannerMapping).addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment