The click command allows you to define a click (through) area in your ad unit. After the visitor clicks this area, a new browser window is opened with the targeted website. This command also registers the action to the ad management system of the publisher and/or the media agency.
Generally, you have one exit per creative. It also is possible to have multiple exits. The way we work is that the first exit URL will be marked as the “default” URL, and all following clicks will be marked as “extra” clicks. You do not configure the exit URLs in the source files (HTML, JS, Animate, Edge, Flash), instead, you configure them in our previewer environment.
Example: Defining a default click in Javascript
screenad.click('default'); // or: screenad.click();
Example: Defining an extra click in Javascript
screenad.click('extra1');
The
screenad.click
command needs to be fired right after the actual click on the click area. If the click command occurs after a certain time after the actual click, a pop-up will occur.
Dynamic clicks
When loading a lot of exit URLs from a XML file for example, and you want to create dynamic clicks you can use the direct URL instead of the ‘default’ or ‘extra’ clicks.
Example: using a direct url for a ScreenAd click.
var name = "Weborama";
function dynamicClick() {
screenad.click("http://www.advertiserurl.com/?name=" + name);
}
clickarea.addEventListener( "click", dynamicClick);
Using a hardcoded url is not recommended. Only use dynamic clicks if your the landing URL cannot be be static.
Comments
0 comments
Please sign in to leave a comment.