Skip to content

Instantly share code, notes, and snippets.

@alstrom
Created October 1, 2013 06:38
Show Gist options
  • Save alstrom/6774637 to your computer and use it in GitHub Desktop.
Save alstrom/6774637 to your computer and use it in GitHub Desktop.
ClickTag script til HTML5 banner
<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