Last active
May 28, 2019 05:16
-
-
Save anderly/542a21c2b713b4d80dd7 to your computer and use it in GitHub Desktop.
DFP Wallpaper Ad 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
<script> | |
var WallpaperAd = WallpaperAd || {}; | |
/*-------------------------------------------------------------------------------------------------------*/ | |
/* Two values are needed for Wallpaper Ads: */ | |
/* 1.) destinationURL (where you want visitors to go when they click the wallpaper) */ | |
/* - NOTE: Click-throughs to this URL will automatically be tracked in DFP */ | |
/* 2.) backgroundURL (URL of wallpaper background image) */ | |
/* - NOTE: Make sure to change the URL to start with | |
http://assets.dmagazine.com so that it is served via CloudFlare CDN (this makes pages and images load faster) */ | |
/*-------------------------------------------------------------------------------------------------------*/ | |
/* IMPORTANT: Change only the two variable values below */ | |
/*-------------------------------------------------------------------------------------------------------*/ | |
WallpaperAd.destinationURL = "http://www.arkansas.com"; | |
WallpaperAd.backgroundURL = "http://assets.dmagazine.com/media/1589280/arkansas-bg2.jpg"; | |
/*-------------------------------------------------------------------------------------------------------*/ | |
/* DO NOT MODIFY CODE BELOW */ | |
/*-------------------------------------------------------------------------------------------------------*/ | |
WallpaperAd.clickThroughURL = "%%CLICK_URL_UNESC%%" + WallpaperAd.destinationURL; | |
(function() { | |
var d=document, | |
h=d.getElementsByTagName('head')[0], | |
s=d.createElement('script'); | |
s.type='text/javascript'; | |
s.async=true; | |
s.src='//assets.dmagazine.com/content/assets/scripts/footer/dmag.wallpaper-ad.js'; | |
h.appendChild(s); | |
}()); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm currently testing this wallpaper out and it works well. The only issue I have is whenever I resize my browser, the left side of the image never moves or expands. So depending on your screen resolution, you'll see a different image on the right side but the left side will always remain static. Is there a way to make changes to the script so I the skinner on the left and right moves/expands together at the same time like the below example?
http://www.cinema.com.my/default_skinnermock_v3.aspx