![]() |
![]() |
![]() |
Maintenance | Maintenance |
The purpose of the Maintenance Statistics Engine is to summarise the impression, click and connection data that are stored in the raw database tables into the intermediate and summary tables.
The intermediate tables store the complete details of all connections (including conversions), and an operation interval/day/hour based breakdown of the ad impressions, clicks and conversions.
The summary table "data_summary_ad_hourly" contains a day/hour based breakdown of the impressions, clicks and conversions. The summary table "data_summary_zone_impression_history" contains an operation interval based history of the actual ad impressions for each zone in Max.
The Maintenance Statistics Engine process for the AdServer module is carried out via the following steps:
Each of these steps is outlined in more detail below.
The Maintenance_Statistics::instance() method is used to create an instance of the Maintenance_Statistics_AdServer class, which in turn creates an instance of the Dal_Statistics_AdServer class, which is used as the data access layer to access the Max database. A check is then made of the current time against the details of the most recent Maintenance Statistics Engine run for the AdServer (stored in the "log_maintenance_statistics" table) to determine there is a need to update the intermediate data, and the summary data stored in the "data_summary_ad_hourly table" (that is, one hour has passed since the last update) or if there is a need to update the intermediate data, and the summary data stored in the "data_summary_zone_impression_history table" (that is, one operation interval has passed since the last update).
Carried out via the Maintenance_Statistics_AdServer::summariseIntermediate() method.
If either summary table needs updating, any connections between ad impressions or clicks and tracker impressions are found, and the details inserted into the "data_intermediate_ad_connection" and "data_intermediate_ad_variable_value" tables. The raw impression, click and conversion data is also summarised into the "data_intermediate_ad" intermediate table.
At present, only the data in the "data_intermediate_ad" table are used, however, the data in the "data_intermediate_ad_connection" and "data_intermediate_ad_variable_value" tables may be used for displaying more detailed information about connections at a later date.
Carried out via the Maintenance_Statistics_AdServer::summariseFinal() method.
If required, the "data_summary_ad_hourly" table is updated from the data in the "data_intermediate_ad" table. Similarly, the "data_summary_zone_impression_history" table is updated if required.
Carried out via the Maintenance_Statistics_AdServer::decrementCampaigns() method.
On the impression, click and conversion data are summarised, the Statistics Engine goes through all the campaigns, and:
Carried out via the Maintenance_Statistics_Common::deleteOldData() method.
If "compact_stats" mode is enabled, then any "old" ad requests, impressions and/or clicks, are deleted (or, if split table mode is also enabled, then any "old" raw ad data tables no longer required are dropped). The process of takes into account any connection windows as well as the "compact_stats_grace" period to determine if old data that has already been summarised should still be kept (i.e. not deleted).
Carried out via the Maintenance_Statistics_Common::logCompletion() method.
The completion of the Maintenance Statistics Engine process is logged to the "log_maintenance_statistics" table so that the next time the engine is run, the required actions can be determined.
A report of the process is also logged to the "userlog" table.
![]() |
![]() |
![]() |
Maintenance | Maintenance |
Documentation generated on Thu, 20 Jan 2005 17:09:06 +0000 by phpDocumentor 1.3.0RC3