Tutorials » Setting Up Website Advertising Using Microsoft AdServer - Configuring and Running Reports

Configuring The Report Script
The final step to automatically producing reports is to configure the Adrpt.vbs script. Ensure that this exists in the Site Server/Bin directory, along with the accompanying Adexport.vbs and Adlogconvert.vbs scripts. If not, copy them from the installation CD.

1.   Open the Adrpt.vbs script in a text editor, and near the top you'll find a configurable section beginning with the words 'Begin Configuration Section. Customize this part'. Firstly uncomment the database section depending on whether you set up Site Server Analysis with SQL Server or Access.

      ' strUADB = "sa:@server/SSA"
      strUADB = "c:\Microsoft Site Server\data\msusage.mdb"

2.   Set the Ad log source path to read 'Log data source' (as set in Usage Import).

      strAdLogSource = "Log data source"
      strContentLogSource = "IIS Logs"

3.   Next set the Site ID. To find out what this is, open up Usage Import as you did previously, and then go to the File menu and click 'Database Contents'. A table will appear, and the site ID is the fourth field in that table.

      strSiteID = "28"

4.   Set 'fImportContentLogs' to False, save the changes made to Adrpt.vbs, and exit.

      fImportContentLogs = False

Those are all the changes required to ensure that the script runs correctly, but there are a few other configurations we can make by altering other variables. These include:

Running The Report Script
There are a couple of ways you can run the report script 'adrpt.vbs'. Firstly, however, ensure that the directory 'adlogs' exists in Microsoft Site Server/Data, and then copy the IIS log file(s) you want to produce a report from to it. These files will have names similar to 'ex000704.log' where the numerals represent the date as YYMMDD. (The beauty of this script is that it can easily be modified to do such things as copying the preceding day's log file to the adlogs directory automatically.) Then, make sure that Usage Import is closed, that IIS is running, and that the windows NT account into which you are logged has access permission to Ad Manager as the script uses Ad Manager to obtain certain information. Then you can either open a DOS window and type in

cscript "C:\Microsoft Site Server\bin\adrpt.vbs"

or go to the Site Server bin directory, right-click on Adrpt.vbs and click either 'Open' or 'Open with Command Prompt'. (At this stage you will see various messages concerning the progress of the script; this is for the purpose of debugging and can be turned off by going to the configurable section of the 'Adrpt.vbs' script and setting the fDebug variable to 'False'.)

Once the script has finished running, you will find the log file 'adrptlog.txt' and a number of reports in the reports directory as specified in the configurable section of the script. These standard reports are:

Here you can see some of the detail from one of the standard reports:

Now that we have our first standard reports, let's look at how we can produce a custom report for one of our advertisers.

 
  1 2 3 4 5 6 7