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