{clickurl} macro for tracking Hype banner clicks in ReviveAdserver

I wonder if samebody can help me with an issue on implementing {clickurl} macro in a html5 banner made with Tumult Hype.

After I create an animated banner with transparent background, I don’t figure out where and how to insert {clickurl} macro for tracking clicks.
It was made after reading a post here, about creating html5 banners.
Banner has an enablerListener which it is triggered on sceneLoad

function EnablerListener(hypeDocument,element, event) {
if (!Enabler.isInitialized()) {
Enabler.addEventListener(
studio.events.StudioEvent.INIT,
enablerInitialized);
} else {
enablerInitialized();
}
function enablerInitialized() {
// Enabler initialized.
// In App ads are rendered offscreen so animation should wait for
// the visible event. These are simulated with delays in the local
// environment.
if (!Enabler.isVisible()) {
Enabler.addEventListener(
studio.events.StudioEvent.VISIBLE,
adVisible);
} else {
adVisible();
}
}
function adVisible() {

// Ad visible, start ad/animation.
hypeDocument.continueTimelineNamed(‘Main Timeline’, hypeDocument.kDirectionForward);
console.log(‘Congrats! adVisible() triggered’);

}

Into the head of the banner I had the following:

<script src="https://s0.2mdn.net/ads/studio/Enabler.js"></script>


<script type="text/javascript">

function clickURL() {
    
    //window.open('http://www.intercomfilm.ro/index.php/2014-12-01-12-12-42/in-curand/item/168-inainte-de-craciun',
    //window.open('%%CLICK_URL_UNESC%%',     
    '_blank' // <- Use _self here to open in the same window.  
  );
 }

</script>

<style>

body {
background-color: transparent;
}

I had on click for the target link exitURL() function

function exitURL(hypeDocument,element, event) {

 clickURL(); 

}

In Revive Ad Server in Create an HTML banner - banner code I insert following code for ad created with Hype:

Generated banner code in Revive Ad Server is:

Where can I insert {clickurl} macro for counting clicks?

Does anybody can help me with this issue?

Regards,

Mihnea

It looks like some of this may have been truncated, so it is a little hard to answer the question. Would you mind reviewing and reposting with the code? Typically you can wrap in a code block with three ticks (the key that is also used for tilde) and that should let the code come through correctly.

Hi Jonathan,

Thank you for triyng to help.

First I have to say that I make the banner as in the tutorial found on your forum
Creating an HTML5 Advertisement in Tumult Hype except that I make background transparent. After I export the banner I uploaded on my server and copy the div script from html to load as HTML banner in Revive ad server. For invocation code I generate as Generic following embed code:
In Revive Ad Server in Create an HTML banner - banner code I insert following code for ad created with Hype:

Generated banner code in Revive Ad Server is:

On exitURL function

   <script type="text/javascript">
    function clickURL() {
      window.open('%%CLICK_URL_UNESC%%',
      '_blank' // <- Use _self here to open in the same window. 
      );
    }
    </script>

I tried to replace %%CLICK_URL_UNESC%% with
window.open(’{clickurl}http://www.intercomfilm.ro’ - didn’t work
I tried to insert this {clickurl} macro directly on js hype generated file. Not a chance. I’m out of solutions.
This {clickurl} macro it is attached before the target link or after the link with &mvc={clickurl} I think. I’m very confused, and try for almost a week to find out a solution, but I didn’t.
I uploaded and the hype file and a txt file with the script. Even if I replace the INSERT_ENCODED_CLICKURL_HERE in script file with {clickurl}, clicks are not tracked. Only impressions. If you need anything else, please let me know and I will send it to you.

Here is again the invocation code:

<script type='text/javascript'><!--//<![CDATA[
   var ox_u = 'http://adserver.creativeads.ro/www/delivery/al.php?zoneid=10&ct0=INSERT_ENCODED_CLICKURL_HERE&layerstyle=simple&align=left&valign=bottom&padding=2&closetime=14&padding=2&shifth=0&shiftv=0&closebutton=t&nobg=t&noborder=t';
   if (document.context) ox_u += '&context=' + escape(document.context);
   document.write("<scr"+"ipt type='text/javascript' src='" + ox_u + "'></scr"+"ipt>");
//]]>--></script>

Also bellow I put a link with Revive AdServer (Formerly OpenX Source) Magic Macros:
http://blackriver.to/2014/01/openx-source-revive-adserver-magic-macros/
My html5 banner ID is 22 in the adserver.

craciun_nd_invocation_code.zip (469.0 KB)

Regards,
Mihnea