1

i'm using Google Web Designer and DoubleClick Studio to create some HTML5 banners. I'm using the TapArea component in the standard way to have a clickthrough. the click launches a new window. my client wants to have it stay in the same window. there is no option in the GWD exit event setup to choose the target window.

In DoubleClick Studio, there is a way to change the window from _blank to _self, but I'm being asked if i can do it in my code or in GWD somehow.

is there a way to do this?

google web designer exit event dialog

split19
  • 597
  • 7
  • 18

1 Answers1

0

Do not use any link, simple publish your ad instead. Open index.html in text editor ie. Notepad++ and – for cursor: pointer effect – put something like this at the beginning of head section:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
    var DOMReady = function(a,b,c){b=document,c='addEventListener';b[c]?b[c]('DOMContentLoaded',a):window.attachEvent('onload',a)}
    DOMReady(function () {
        divCont = document.getElementById("swiffycontainer") || document.getElementById("canvas") || document.getElementById("gwd-ad");
        divCont.style.cursor = "pointer";
        });
</script>

<style type="text/css">
    *{margin: 0px; padding:0px; }
    canvas {cursor: pointer;}
</style>

Demo:

http://clients.weborama.nl/files/campaigns2/3778213481/99281/default.htm

After that insert this at the end, before

</body>

tag:

<script>
  $('#page1').click(function() {
      window.open("http://www.yourtarget.com/","_self"); 
});
</script>

Where '#page1' is your gwd-page ID. If you prefer opening your ad in new tab or window, use "_blank" instead.

iberan
  • 1
  • 1