How to implement an HTML5 DoubleClick ClickTag?

I have created an html5 banners and validated it here: https://h5validator.appspot.com/dcm.

It returns the error: "Missing click tag check".

How do I implement a clickTag? I've found this code on google support:

<html>
  <head>
    <meta name="ad.size" content="width=300,height=250">
    <script type="text/javascript">
      var clickTag = "http://www.google.com"; 
    </script>
  </head>

  <body>
    <a href="javascript:window.open(window.clickTag)">
      <img src="images/dclk.png" border=0>
    </a>
  </body>
</html>

But isn't the destination URL of the banner set after uploading the ZIP file in DoubleClick?

Do I have to set the destination URL hardcoded in the HTML? Doesn't make any sense to me..

I have made a lot of flash banners in the past and there you only referred to a variable _root.clickTag.

Can anyone help me out?

Thanks


In order to create a doubleclick studio banner you need to import doubleclick studio library and initialize enabler. Then set Exit_url. Save yourself all the trouble create the Banner in Google Web Designer its easy and will upload directly to DC studio

    <script src="https://s0.2mdn.net/ads/studio/Enabler.js"></script>

       <style>html, body {width: 100%; height: 100%}
        #bg-exit {
        background-color: rgba(255,255,255,0);
        cursor: pointer;
        height: 381px; //banner height
        left: 0px;
        position: absolute;
        top: 19px;
        width: 400px; //banner width
        z-index: 1;
    }</style>

   <div id="bg-exit"></div> <!-- put this div inside your main container of banner -->

<script>
    window.onload = function() {
  if (Enabler.isInitialized()) {
    enablerInitHandler();
  } else {
    Enabler.addEventListener(studio.events.StudioEvent.INIT, enablerInitHandler);
  }
}

function enablerInitHandler() {

}
    function bgExitHandler(e) {
  Enabler.exit('Background Exit');
}

document.getElementById('bg-exit').addEventListener('click', bgExitHandler, false);
    </script>

Using this code you can change the exit_url from DC studio Dynamically

链接地址: http://www.djcxy.com/p/32308.html

上一篇: 实施HTML5横幅广告

下一篇: 如何实施HTML5 DoubleClick ClickTag?