5

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

albert105
  • 119
  • 1
  • 2
  • 8
  • Same question here. It makes little sense to me that the documentation calls for a clickTag to be hardcoded in the individual creative, when the clickthrough URL gets assigned in DoubleClick. Any insight? I don't understand why there would ever be a clickTag = "url" declaration. – Bangkokian Nov 14 '16 at 09:30

1 Answers1

1

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

Edy0
  • 54
  • 7
  • Ok, I'm a bit of a noob on html5 banners.. so I might sound dumb. I've already build the banner myself in html/css/js and it works fine in Google Adwords. The DoubleClick Campaign Manager HTML5 Validator only returns an error on the Missing Click Tag. It also refers to a URL: https://support.google.com/dcm/partner/answer/3145300#dev with the solution above. Can the hardcoded URL be overwritten after the banners is placed in DoubleClick? – albert105 Feb 22 '16 at 12:54
  • Yes you can have hard coded the urls but in order to create double click studio banners you need to include enabler library I am updating my answer with code above... Accept the answer if it was of some use – Edy0 Feb 22 '16 at 13:23
  • Thanks for helping out! – albert105 Feb 22 '16 at 14:56
  • What does enablerInitHandler() do? – Bangkokian Nov 11 '16 at 07:47
  • I'm confused: Where did you set exit_url? Doesn't that need to be declared? – Bangkokian Nov 11 '16 at 07:50