0 Replies Latest reply on Oct 17, 2014 12:08 PM by productionArtistChad

    doubleclick clickthrough/exit button question

    productionArtistChad Level 1

      So I made a banner in edge to be trafficked through doubleclick and I need to add a click through (they call it an "exit") to track the banner and have it go to a destination URL. I found information on this but am not exactly sure what to do. Here is what they say.

       

      1. Create a button element in your creative using a <div> tag. Create the element in the HTML file and style it in the CSS file. Then assign the ID bg-exit to your element.Sample <div> tag object in the HTML file:
        <div id="bg-exit"></div>
        Sample styling and ID selector in the CSS file:
        #bg-exit {
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0px;
            left: 0px;
            cursor: pointer;
            opacity: 0;
        }

       

      This part I get and put it in my index file.

      the second part says I need to put code in my java script file and I tried putting it in the "edge.js" file and I get a java script error when trying to open it in edge. Here is the code.

       

      Add exit functionality to the JavaScript by calling this method: Enabler.exit('exit name goes here');

      Code snippet

       

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

      document.getElementById('bg-exit').addEventListener('click', bgExitHandler, false);