Created
October 1, 2013 06:38
-
-
Save alstrom/6774637 to your computer and use it in GitHub Desktop.
ClickTag script til HTML5 banner
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 src="http://s1.adform.net/banners/scripts/rmb/Adform.DHTML.js"></script> | |
<script> | |
var banner = document.getElementById('click1'); | |
clickTAGvalue = dhtml.getVar('clickTAG', 'http://www.example.com'); //banner will receive clickTAG value - if not defined, banner will land to example.com | |
landingpagetarget = dhtml.getVar('landingPageTarget', '_blank'); //landingPageTarget variable enables to change target from Adform system. | |
banner.onclick = function() { | |
window.open(clickTAGvalue,landingpagetarget); //when banner is clicked it will open new window directing to clickTAG value | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment