Displaying Banner Ads

Example

Displaying Banner Ads for the MacCPU company and the StarNine company at the top of your home page.

MGI Tags

  • mgiBannerAd

Steps

  1. Create a banner ad administration page.
  2. Save the banner ad administration page.
  3. Open the banner ad administration page in a text editor.
  4. Insert the mgiBannerAd tag in admin mode.
  5. Save the banner ad administration page.
  6. FTP the banner ad administration page to the web server running MGI.
  7. Access the web-based banner ad administration page.
  8. Create a new banner ad set.
  9. Add the MacCPU and Starnine banner ads to the LongBanners set.
  10. Open your home page in a text editor.
  11. Insert the mgiBannerAd tag.
  12. Save your home page.
  13. FTP your home page and the banner ads to the web server running MGI.
  14. View your home page in a browser.


Step 1: Create a banner ad administration page.

Create a new HTML page to use for banner ad administration. The content of this page will be dynamically generated by MGI, therefore you do not need to include any form elements on the page.

Step 2: Save the banner ad administration page.

Save the banner ad administration page and name it "banneradmin.html".

Step 3: Open the banner ad administration page in a text editor.

Open the banner ad administration page in a text editing program that allows you to view and modify HTML.

Step 4: Insert the mgiBannerAd tag in admin mode.

Insert your cursor after the beginning <BODY> tag and enter the mgiBannerAd tag and mode parameter. In the mode parameter, enter the value "Admin":
<mgiBannerAd mode="Admin">

Step 5: Save the banner ad administration page.

Save the changes you have made to the banner ad administration page.

Step 6: FTP the banner ad administration page to the web server running MGI.

Upload the banner ad administration page from your local computer to the web server using an FTP program.

Step 7: Access the web-based banner ad administration page.

Access the banneradmin.html page from a web server running MGI. The administration mode of mgiBannerAd displays a form to create a new banner ad set.

Step 8: Create a new banner ad set.

In the text field under Banner Ad Sets, enter the name "LongBanners" and click the "Select Set" button. The banner ad search form appears.

Step 9: Add the MacCPU and Starnine banner ads to the LongBanners set.

To add a new banner ad, click the "Add Record" button. A form with the fields Client, Ad Name, Projected Hits, Start Month, End Month, HTML Code, Impressions, and Click Thrus appears. When you add a new record, you will enter information in the first 6 fields (do not enter impressions or click thrus when you add a new record- they are calculated automatically):
  • Client: The name of the company or individual purchasing the banner ad. The client name is for your record keeping purposes only.
  • Ad Name: The name of the banner ad. This does not have to be the name of the image file. The ad name is for your record keeping purposes only.
  • Projected Hits: The projected (sold) hits for the banner ad over the time period specified in the start and end date. For example, if you sell 5000 hits per month for three months, then the projected hits will be 15000 and the start to end date will be a three month time frame (of course you could also create three banner ad records, each with 5000 projected hits and a one month time frame). Before selling banner ad space, you should get traffic reports for your web site to help you estimate the total hits that are available for sale.
  • Start Date: The month, day and 4-digit year that the banner ad should be placed in rotation for the set.
  • End Date: The month, day and 4-digit year that the banner ad should be taken out of rotation for the set.
  • HTML Code: The HTML code including text, image sources and links that will display for the banner ad.
  • Impressions: The total number of times the ad has been displayed on a page. The impressions are calculated automatically by mgiBannerAd and will be zero (0) for new ads.
  • Click Thrus: The total number of times a user has clicked the banner ad and linked to the URL specified in the HTML Code. The click thrus are calculated automatically by mgiBannerAd and will be 0 for new ads.
 
For the first company, enter "MacCPU" in the Client field. Enter "MacCPU Banner 1" in the Ad Name field. Enter 20000 in the Projected Hits field. Enter the current numeric month, day and four digit year in the Start Date fields. Enter the numeric month, day and four digit year of the date one month from the current date in the End Date Field. Enter the following HTML in the HTML Code field:
<center>
<a href="http://www.maccpu.com">
<img src="maccpu_banner1.gif" border="0"></a>
</center>
Click the "Add Record" button to add MacCPU's Banner 1 to the "LongBanners" banner ad set. Click the "Add Record" button again to add a second record. For the second company, enter "Starnine" in the Client field. Enter "WebSTAR" in the Ad Name field. Enter 20000 in the Projected Hits field. Enter the current numeric month, day and four digit year in the Start Date fields. Enter the numeric month, day and four digit year of the date one month from the current date in the End Date Field. Enter the following HTML in the HTML Code field:
<center>
<a href="http://www.starnine.com">
<img src="webst1.gif" border="0"></a>
</center>
Click the "Add Record" button to add Starnine's WebSTAR banner to the "LongBanners" banner ad set.

Step 10: Open your home page in a text editor.

Open your home page in a text editing program that allows you to view and modify the HTML of your page.

Step 11: Insert the mgiBannerAd tag.

Insert your cursor after the beginning <BODY> tag and enter the mgiBannerAd tag and bannerAdSet parameter. In the bannerAdSet parameter, enter the set name "LongBanners":
<mgiBannerAd bannerAdSet="LongBanners">

Caution: Banner ad sets are database tables, therefore the banner ad set name is case-sensitive.

Step 12: Save your home page.

Save the changes you have made to your home page.

Step 13: FTP your home page and the banner ads to the web server running MGI.

Upload your home page and banner ad images (maccpu_banner1.gif and webst1.gif in our example) to the web server running MGI.

Step 14: View your home page in a browser.

View your home page in a browser. At the top of your page, either the MacCPU banner ad or the Starnine banner ad appears. If you reload the page, a new (not necessarily different) banner ad appears. An algorithm that accounts for the number of banner ads, the length of banner ad contracts and the projected hits determines which banner ad from the set is displayed when the page is accessed.


[Return to the Displaying Banner Ads Menu]


[User Guide Main Menu] [Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]