I have an HTML5 banner ad file that was created by exporting from Flash with the Swiffy extension. I've added the clickTag as the per the last answer in this post: DoubleClick Studio ClickTag after using Swiffy.
Here is the code that was added as per the post referenced above:
Added to the head of the document:
<script src="https://s0.2mdn.net/ads/studio/Enabler.js"> </script>
Wrapped the <div id="swiffycontainer">
with a <div id="bg-exit">
:
<div id="bg-exit">
<div id="swiffycontainer"></div>
<div>
Add the following CSS style to make the required transparent button:
#bg-exit {
background-color: rgba(255,255,255,0);
cursor: pointer;
height: 100%;
left: 0px;
position: absolute;
top: 0px;
width: 100%;
}
Then added the following script at the bottom of the document to add the required Exit:
<script>
function bgExitHandler(e) {
Enabler.exit('Background Exit');
}
document.getElementById('bg-exit').addEventListener('click', bgExitHandler, false);
</script>
When I check the ad locally through the Google Chrome console tab, I get the following error: "Uncaught ReferenceError: Enabler is not defined" on this piece of the exit script:
function bgExitHandler(e) {
Enabler.exit('Background Exit');
}
Can anyone help? Thanks in advance.