Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

doubleclick clickthrough/exit button question

$
0
0

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);

 


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>