DynAds
| Sample Testimonial
|
Just wanted to let you know, now that we got past the learning curve everything is going wonderfully!
Thanks for such a GREAT product!!!
Garry & Kacy, HardEngineering.com
More...
|
|
Periodic Rotation
Sometimes you want to rotate your ads or content in periodic time intervals.
For example, you may want to display the same content for one day and
display another content the other day, automatically.
Instructions for daily banner ad rotation
Suppose that you have some ads or contents that you want to rotate daily.
Every day, you want to display an ad from the available active ads in the ad group.
When the rotation comes to the end of the list, it starts from the beginning again.
We further assume that you created the ads and placed them into an ad group
in the order you want them to appear, in DynAds admin panel.
You can achieve this periodic rotation with the help of some scripting.
If your page is written in PHP, you can use a PHP script. If your page is generated by a Perl script,
then you can use a Perl code snippet to access the ads. If your page is a static HTML page or
you do not employ PHP or Perl to generate your page, then you can use a Java Script rotation code.
The code examples are given in the following sections.
Java Script rotation
Place the following code into your page where you want the ads to appear.
Assign the particular values to the variables.
StartDate is the date you assume that the first ad in the rotation list will appear.
It must be in the format given in the example.
PeriodHours is the period of the rotation in hours.
AdGroup is the name of the ad group you placed the ads in the admin panel.
DispPosName is the name of the rotation on your page. You can assign it to the name
of the ad group, if you do not want to differentiate different rotations of the same ad group.
ScriptUrl is the full URL of the delivery engine script, ad.pl.
PHP rotation
Place the following code into your page where you want the ads to appear.
Assign the particular values to the variables.
$StartDate is the date you assume that the first ad in the rotation list will appear.
It must be in the format given in the example.
$PeriodHours is the period of the rotation in hours.
$AdGroup is the name of the ad group you placed the ads in the admin panel.
$DispPosName is the name of the rotation on your page. You can assign it to the name
of the ad group, if you do not want to differentiate different rotations of the same ad group.
$ScriptUrl is the full URL of the delivery engine script, ad.pl.
Perl rotation
Place the following code into your page generating Perl code.
Assign the particular values to the variables.
%StartDate is the date you assume that the first ad in the rotation list will appear.
It must be in the format given in the example.
$PeriodHours is the period of the rotation in hours.
$AdGroup is the name of the ad group you placed the ads in the admin panel.
$DispPosName is the name of the rotation on your page. You can assign it to the name
of the ad group, if you do not want to differentiate different rotations of the same ad group.
$ScriptUrl is the full URL of the delivery engine script, ad.pl.
|
|