HTML banners

"Русская версия"

Description

Any html-code used to show banners using our system.

HTML banner - a banner, containing html code.
It may either be your HTML code that defines the banner’s layout or an embed code from a side-system.

Example

Take a look at this HTML-banner. Example

Training

When you are preparing an HTML banner it is very important to specify the reference to the advertiser’s site correctly. That is in such a way that we could count transitions and form statistics.

Any direct reference link to the advertiser’s website found in your banner must be replaced with the following statement %REFERENCE%.

If for example we had this code:

<a href="http://www.adfox.ru/">AdFox – профессиональные технологии Интернет-рекламы</a>

This is how it will look afterwards:

<a href="%REFERENCE%">AdFox – профессиональные технологии Интернет-рекламы</a>

Now all you have left to do is specify the link in our interface when adding the banner.

If you have a flash-banner to count transitions attach this code to the URL address of your main SWF ?link1=%REFERENCE_ENCODED%

Example: link http://www.server.ru/banner.swf to be replaced by http://www.server.ru/banner.swf?link1=%REFERENCE_ENCODED%.

1. %REFERENCE_ENCODED% is used for flash references
2. %REFERENCE% - for HTML links

Note that these changes for flash references only make sense if flash itself is prepared according to our requirements.

Flash in HTML-banners

There may be some problems using flash in Internet Explorer version N an higher. Any flash banner needs a confirmation from the user to start. In earlier versions it needs a click to activate. Most people will not click twice or may get scared by the confirmation message.

Thankfully, there is a way around this:
Do not add <object> and <embed> tags directly into HTML, use Javascript to do it for you. Do not use document.write function either, for this will not solve the problem.

Our solution is fairly simple. Create a variable named adfox_object. Put all your HTML in it. And use our simple script afterwards.

Download the script

For example you have the following code in a more or less traditional form:

<script type="text/javascript">
...
if (ShockMode == 1){
document.write('<object ...');
document.write('...');
document.write('</object>');
}
...
</script>
<noscript>
...
</noscript>

You need to do three things:
1. Declare a variable named adfox_object and assign it an empty string as the value
2. Replace calls to document.write("..."); with string concatenation operations adfox_object += "...";
3. And add a call to an external script write_object.js

You get this code:

<script type="text/javascript">
var adfox_object = "";
...
if (ShockMode == 1){
adfox_object += '<object ...';
adfox_object += '...';
adfox_object += '</object>';
}
...
</script>
<noscript>
...
</noscript>
<script type="text/javascript" src="http://banners.adfox.ru/write_object.js"></script>

Event counting

For example, your HTML banner has several options for transition, leading to different pages of the advertiser’s site, to count the number of transitions for each link use our event mechanism. Say we have this code.

<a href="http://site.ru">first link</a>  
<a href="http://site.ru/about/">second link</a>

In this case: we replace direct links with a %reference%%, so that we have could count total number of transitions and then using the @%event1% statement redirect the user to the desired page. That is, we set the transition to any particular page as an event. The links for these transitions will be specified in our interface in the event tab of the banner.

New code:

<a href="%reference%@%event1%">first link</a>  
<a href="%reference%@%event2%">second link</a>

Specifying links in our interface. Open tab Banners -> Events:

"Подсчет событий"

Now our main statistics will show the number of total transitions and event statistics will show the number of transitions for each separate link.

Last update: 07.06.2012