The mgiBannerAd Tag

Tag Behavior

Use the mgiBannerAd tag to randomly or sequentially display banner ads or other HTML, MGI and text information. Use the web-based administration interface to manage the banner ad information.


Tag Syntax

The mgiBannerAd tag has three modes. Each mode has different required and optional parameters. The modes of mgiBannerAd are:

  • display - Displays banner ads.
  • admin - Creates a web-based interface to manage banner ads.
  • clientStats - Displays statistics for specified banner ad clients.

Display Mode

The display mode of mgiBannerAd has no required parameters and six optional parameters. The tag form is:

<mgiBannerAd mode="display" group="name" rotation="Type" 
odbcDatasource="Source Name" odbcUsername="Name" 
odbcPassword="Password">

Required Parameters:

  • None.

Optional Parameters:

  • mode - The mode is the function that the mgiBannerAd tag performs. In "display" mode, the mgiBannerAd tag rotates the display of banner ads. "Display" is the default mode of the mgiBannerAd tag.
  • group - The group is the name of the banner ad group from which banners are selected for display. If the group parameter is not included, banner ads will be selected from all groups.
  • rotation - The rotation determines the algorithm used to select banner ads for display. If the rotation parameter value is "random", then banner ads are randomly selected for display. If the rotation parameter value is "sequential", then banner ads are displayed in the order they appear in the banner ad database. The default value is "random".
  • odbcDatasource (NT only) - The odbcDatasource is the name of datasource on the server that provides access information for an external ODBC database. If the odbcDatasource parameter is included, banner ad information will be stored in the specified ODBC database rather than the internal MGI database. Inquire with the server administrator for additional information about the use of ODBC databases. If you include the odbcDatasource parameter, the odbcUsername and odbcPassword parameters are required.
  • odbcUsername (NT only) - The odbcUsername is the username required to access the ODBC datasource. The odbcUsername parameter is required if you include the odbcDatasource parameter.
  • odbcPassword (NT only) - The odbcPassword is the code required to access the ODBC datasource. The odbcPassword parameter is required if you include the odbcDatasource parameter.

Admin Mode

The admin mode of mgiBannerAd has one required parameter and four optional parameters. The tag form is:

<mgiBannerAd mode="admin" advancedSearch="On/Off" 
odbcDatasource="Source Name" odbcUsername="Name" 
odbcPassword="Password">

Required Parameters:

  • mode - The mode is the function that the mgiBannerAd tag performs. In "admin" mode, the mgiBannerAd tag creates a web-based interface that allows you to add new banner ads, modify banner ads, and view banner ad statistics.

Optional Parameters:

  • advancedSearch - The advancedSearch parameter determines whether the advanced search feature is available in the web-based administration interface. The advanced search feature allows you to enter complex search strings that are not available with the built-in search functions (e.g., "NOT" searches, "OR" searches, searching the same field multiple times, etc.). The search time will increase as the search complexity increases. If the advancedSearch parameter value is "On", then the advanced search field is displayed in the search screen of the admin interface. If the advancedSearch parameter value is "Off", then the advanced search field is not displayed in the search screen of the admin interface. The default value is "Off".
  • odbcDatasource (NT only) - The odbcDatasource is the name of datasource on the server that provides access information for an external ODBC database. If the odbcDatasource parameter is included, banner ad information will be stored in the specified ODBC database rather than the internal MGI database. Inquire with the server administrator for additional information about the use of ODBC databases. If you include the odbcDatasource parameter, the odbcUsername and odbcPassword parameters are required.
  • odbcUsername (NT only) - The odbcUsername is the username required to access the ODBC datasource. The odbcUsername parameter is required if you include the odbcDatasource parameter.
  • odbcPassword (NT only) - The odbcPassword is the code required to access the ODBC datasource. The odbcPassword parameter is required if you include the odbcDatasource parameter.

ClientStats Mode

The clientStats mode of mgiBannerAd has two required parameter and three optional parameters. The tag form is:

<mgiBannerAd mode="clientStats" client="Name"
odbcDatasource="Source Name" odbcUsername="Name" 
odbcPassword="Password">

Required Parameters:

  • mode - The mode is the function that the mgiBannerAd tag performs. In "clientStats" mode, the mgiBannerAd tag displays impression, clickthrough and date statistics for the specified client.
  • client - The client is the name of the client whose statistics are displayed.

Optional Parameters:

  • odbcDatasource (NT only) - The odbcDatasource is the name of datasource on the server that provides access information for an external ODBC database. If the odbcDatasource parameter is included, banner ad information will be stored in the specified ODBC database rather than the internal MGI database. Inquire with the server administrator for additional information about the use of ODBC databases. If you include the odbcDatasource parameter, the odbcUsername and odbcPassword parameters are required.
  • odbcUsername (NT only) - The odbcUsername is the username required to access the ODBC datasource. The odbcUsername parameter is required if you include the odbcDatasource parameter.
  • odbcPassword (NT only) - The odbcPassword is the code required to access the ODBC datasource. The odbcPassword parameter is required if you include the odbcDatasource parameter.


Example Usage and Output

Display Mode

<mgiBannerAd group="top">

In this example, a banner ad from the group "top" are displayed randomly each time the page is accessed. The display of the individual banner ad is based on the HTML entered for the banner ad record.

Admin Mode

<mgiBannerAd mode="admin">

When you access a page with the mgiBannerAd tag in admin mode, buttons for creating a new banner and importing existing banner ads display.

The following is the main interface to mgiBannerAd in admin mode:

The following is the interface to add a new banner ad in the admin mode of mgiBannerAd:

ClientStats Mode

<mgiBannerAd mode="clientStats" client="Lexus">

In this example, impression and click-through statistics for all of Lexus' banner ads are displayed in a table.


Suggested Usage

  • Banner Ad Display


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]