OPEN ADSTREAM
Inventory Manager: Technical Notes

Table of Contents
Overview
Terms and Notation
Configuration
Inventory Items
Fundamental Inventory Item
History Data
Input Data
Output Data
Campaign Scheduled Area
Projection Algorithm
Forecast Algorithm

Overview
The Inventory Manager (IM) consists of two primary pieces. The first piece does the forecasting computations and loads the forecasting databases. The second piece queries these databases to present various views of the forecast data through Open AdStream’s user interface.  

These technical notes are a summary of the information in the Inventory Manager Technical Overview, which is accessible via the Open AdStream Help Pages.

Back to Top


Terms and Notation
Basic Inventory Definitions:
  • An Installation is the entire set of sites that are part of a single Open AdStream package.

  • A Site is a group of pages with the same specific domain. Sites are the entries in the site database.

  • A Section is a group of similarly themed pages. A section may contain pages from a single site or from several different sites within the same installation. The relationship of a page to a section has to be explicitly established through the OAS User Interface. A page may belong to multiple sections and conversely a section may contain multiple pages. The set of sections are the entries in the section database.

  • A Page is a directory (DirectoryURL or DirectoryURL@Position) or a file (FileURL or FileURL@Position) that is associated with a site in one of your installations. Pages are entries in the page database. Please note that each site must also be an entry in the page database.

  • Positions are ad banner locations on a web page. Positions can be associated with each page, section or site. When a position is associated with a section, for example, that position is implicitly associated with every page that belongs to the section. The set of allowed positions are the entries in the position database.

  • Inventory Items are the set of delivery events for which the IM computes forecast and statistical information. Click [here] for a breakdown of inventory items.



A Campaign is an entry in the campaign database. A campaign's Attributes are defined through the OAS User Interface (UI). Some important ones are:
  • Status: A campaign's status indicates how OAS will regard it. There are several different designations such as Ordered, Reserved, Cancelled, Suspended, Live, Completed, and Work in Progress. Campaigns with status values that are to be included in the forecasting are specified in the IM configuration file, which may be modified by the systems administrator.

  • Reach: The four reach options are DYNAMIC, FIXED, OPEN, and HOUSE. Campaigns with Reach=DYNAMIC or Reach=FIXED deliver a limited number of impressions per day specified by the attribute DailyImp. These campaigns have "booked impressions" and therefore have a higher delivery priority than impressions for OPEN or HOUSE campaigns. The latter feed off of "remnant impressions" or available inventory.

  • DailyImp: States the number of impressions to be delivered each day. This value is necessary for campaigns that have Reach set to either DYNAMIC or FIXED. It is optional for campaigns that have Reach set to OPEN or HOUSE. DailyImp is recomputed daily for DYNAMIC campaigns to ensure even delivery over the life of the campaign; this means that underdelivery on one day is compensated for by overdelivery one or more subsequent days. Specifying DailyImp value for OPEN or HOUSE campaigns has no effect on the delivery engine, but is used by the IM to reserve space for these campaigns in the Booked column and to adjust the available inventory accordingly.

  • StartDate and EndDate: Specify the time frame for the life of the campaign. You must set both for DYNAMIC campaigns.

  • ScheduledImp: Total number of Impressions to be delivered over the life of the campaign. Necessary for DYNAMIC campaigns.

  • ScheduledCt: Total number of Click-Throughs to be measured over the life of the campaign. This is necessary for Campaigns that have EndType set to Click-Through.

  • EndType: A campaign's EndType specifies its completion option. There are four choices: SOONEST, LATEST, END DATE, IMPRESSION, and CLICK-THROUGH.

    • Campaigns with the completion option set to SOONEST terminate when the date, impression OR click-through setting is met. Choosing this radio button signifies that a campaign will end if either date, impression or click-through registers first. This is the default option.

    • Campaigns with the completion option set to LATEST terminate when the date, impression, AND click-through settings are met. Choosing this radio button signifies that a campaign will end only when the date, impression, and click-through have all registered in total. Please note that the number of impressions will not be re-computed daily if this option is selected. Therefore, if Latest is selected for Completion, DYNAMIC should not be selected for Reach.

    • Campaigns with the completion option set to END DATE terminate when the end date is met.

    • Campaigns with the completion option set to IMPRESSION terminate when total impressions are met.

    • Campaigns with the completion option set to CLICK-THROUGH terminate when the click-through goal has been met.



  • Campaigns may be explicitly scheduled to a set of Sections. A campaign is implicitly scheduled to other sections if it is scheduled to a page that belongs to one or more other sections.

  • Campaigns may be explicitly scheduled to a set of Pages. A campaign is implicitly scheduled to other pages if it is scheduled to a Section that contains one or more other pages.

  • A Campaign may be scheduled to run only on certain Days of the Week.

  • A Campaign may be scheduled to run only during certain Hours of the Day.

  • Each Campaign owns a set of Creatives.

  • Each Creative is scheduled to a set of Positions.

  • A Campaign is implicitly scheduled to a set of Positions. This set includes all of the positions to which a campaign's creatives are scheduled.


Back to Top

Configuration
The Inventory Manager uses several configuration parameters which are defined in its configuration file. The configuration parameters can be modified by a systems administrator. Any changes to this file will become effective the following day, or when the systems administrator forces the nightly processing. The parameters and their default values are:
  • AccountId=OasDefault: Specifies the OAS account for which forecasting is computed.

  • WorkPath=Temp: Specifies the directory into which output files are placed. Among these files are $dbTable.db files which are subsequently imported into the database.

  • IncludedStatus=Live;Ordered;Reserved: Specifies that only campaigns with these status designations will be included in forecasting calculations on available inventory.

  • ForecastPeriod=56: Specifies the number of days -- starting from today -- for which forecasting computations are done. This time period can be increased as desired, but making it too large may cause the nightly processing to take too long to run.

  • ForecastType=NoGrowth: Specifies the method that the IM will use to take its historical analysis and project the anticipated total impressions that will be delivered to an Inventory Item over the course of the Forecast Period. Refer to the notes on the Projection Algorithm for details.

  • InflatePercent=0: This parameter is used in the event that the projected impressions on an inventory item are to be uniformly inflated -- or deflated -- by a set percentage that is over and above the results projected with the forecast type. This is useful if the site anticipates abnormal traffic behavior in the near future. The inflation factor applied to the projected total is determined by the following equation: FACTOR = 1 + (InflatePercent / 100.0). Therefore, when InflatePercent is set to its default value of 0, then no inflation is implied). To prevent outlandish projections, this number is restricted to the range of -50 to 100 (inclusive). In other words, the range is from halved projection to doubled projection).

  • PctGrowthPerDay=1: This parameter is applied only when ForecastType=CustomGrowth. This value represents the percentage growth per day that will be applied to the average impressions on each inventory item in order to calculate its projected total on a future date. To prevent outlandish projections, this number is restricted to the range -20 to 20 (inclusive). In other words, setting PctGrowthPerDay to 20 is equivalent to a doubling of the total in 5 days, but setting PctGrowthPerDay to -20 is equivalent to halving the projected total in 5 days.



Back to Top

Inventory Items
Inventory Items are the set of delivery events for which the IM computes Forecast and Statistical information. The Inventory Items in this release of Open AdStream are Page, Position, Section, Site, Page@Position, Section@Position and Site@Position. Of these items, Page@Position is considered the fundamental inventory item because it is the basis for calculating the others. Each delivery event is uniquely associated with a page and position. Both the event and its unique association are logged. When the loadstat script runs overnight, log data is converted into database files for forecasting. This database information represents the historical inventory (or raw, logged traffic data) for that Page@Position on a specific day. The historical inventory for any other area of the Website can be determined by adding the numbers for the fundamental inventory items that correspond to it. For example:
  • The data for a Page is determined by adding the data for every Page@Position that is associated with the Page.

  • The data for a Section is determined by adding the data for each Page@Position in which the page is contained in the Section.

  • The data for a Position is determined by adding the data for each Page@Position that has the Position in common.

  • The data for a Site is determined by adding the data for each Page@Positions where the page is part of the Site's domain.

  • The data for a Section@Position is determined by adding the data for every Page@Position that meets these requirements:
    • The Page@Position has the same Position as the specified Section@Position.
    • The page is contained in the Section.


  • The data for a Site@Position is determined by adding the data for every Page@Position that meets these requirements:
    • The Page@Position has the same Position as the specified Site@Position.
    • The page is part of the Site's domain.




Back to Top

Fundamental Inventory Item
Page@Position is the fundamental inventory item because it is the basis for calculating all other inventory items. To illustrate this, we will use the example of a web browser reading a web page that has ad tags. For the purpose of this illustration, the viewed web page will be referred to generically as a "document". The ad delivery process can be summarized as follows:
  1. A web browser encounters a document that has ad tags. This document is identified with its own webURL. When the web browser encounters the ad tags, it makes an ad request to the OAS delivery engine (DE). Two parameters are passed along with the request: the WebURL of the document and the Position in which to place the ad.

  2. The DE finds the campaigns that are scheduled to the Page(s) in the OAS database that most closely match the WebURL of the target document.

  3. The DE chooses a creative for the campaign with the highest priority and delivers it to the document.

  4. The delivery event is logged.


As the above example shows, each delivery event is uniquely associated with a page and a position. And OAS logs each delivery for analysis.
  • The event log is crunched nightly to get condensed data for a set of reporting tables in the database.

  • Therefore, the report data is updated nightly and contains Impression and Click-through counts (raw traffic) for that Page@Position on that day.

  • As described previously in the Inventory Items section, the total delivery data on any other area of the website can be determined by adding the numbers for every Page@Position which belongs to it.



Back to Top

History Data

  • The delivery engine logs each delivery and click-through event that occurs during the day and records them in a daily Logs file.

  • When nightly processing is run, the daily log file is analyzed and crunched to create report data files which are subsequently imported into the database.

  • The history data tables necessary for Inventory Management are the ones that summarize activity for each Page@Position, Section@Position and Site@Position. The Page@Position table contains the data:

       When^Page^Position^Impressions^Clicks

    and the same holds true for the Section@Position and Site@Position tables.


  • Page@Position data is essential for inventory forecasting. Forecasting is done by extrapolating past behavior. In the absence of historical data, no forecasting is possible.

  • The only pages that show up in the IM's UI screens are the pages in the Page@Position data and likewise the only positions are the distinct ones in the Page@Position data. Any other page or position defined in the system Page or Position tables through the UI are deemed effectively inactive and irrelevant because they had no history.

  • As a corollary, the only sections and sites that appear in the Inventory Manager UI screens are those that are related to the pages in the Page@Position data. Other sections and sites are deemed inactive because they lack history. Likewise, the only positions in the Inventory Manager UI screens are the distinct positions found in the Page@Position data.


Back to Top

Input Data
The IM reads input data from these sources:
  • The Primary database tables: Campaign, Creative, Position, Site, Section, and Location

  • The Relation database tables. These tables relate the records in the Primary database tables with each other

  • The Page@Position Report table

  • The IM Configuration file


Back to Top

Output Data
The IM writes its output data to these database (i.e., forecast) report tables:
  • Page Stats, Position Stats, Section Stats, Site Stats, Page@Position Stats, Section@Position Stats, Site@Position Stats, and Campaign Stats.

    These tables (with the exception of Campaign Stats) contain statistical information for the current day for the corresponding inventory item. For example, Page Stats has one record per page with data for Average Impressions, Average Clicks, Impression Growth and Click Growth.


  • Page Forecast, Position Forecast, Section Forecast, Site Forecast, Page@Position Forecast, Section@Position Forecast, Site@Position Forecast, and Campaign Forecast.

    These tables (with the exception of Campaign Forecast) contain forecast information for the corresponding inventory item. For example, Page Forecast has records for each page. The exact number of records recorded for each page is equal to the number of days in the forecast period (which is 56 by default). This means there is one record for each day, starting with the current day and continuing into the future. Each record has information for Total, Guaranteed, Remnant and Available impressions for that page for that particular day.


  • The Campaign Stats table has campaign delivery status information for the current day. In other words, it has one record per campaign with data for imp/ct overrun, days left, imp/ct percent completed etc.

  • The Campaign Forecast table has records for each campaign. The exact number of records recorded for each campaign is equal to the number of days in the forecast period (which is 56 by default), one for each day starting with the current day and into the future. It has information about the campaign's target, dayflag (whether the campaign is active or not), and cumulative impressions expected as of that day.

  • Please note that a campaign may be inactive on a certain day for several reasons:
    • The date in question falls on the wrong day of week.
    • The campaign's Start Date comes after the date in question.
    • The campaign's End Date occurs before the date in question.
    • The campaign's cumulative impressions as of that date exceeds its total scheduled impressions.


Back to Top

Campaign Scheduled Area
To determine the Page@Position's to which a campaign is scheduled, the DE goes through the following process:
  • The set of pages that the campaign is explicitly scheduled to is determined.

  • The set of sections that the campaign is explicitly scheduled to is determined.

  • The set of pages that the campaign is implicitly scheduled to through its sections is determined.

  • The explicitly and implicitly scheduled pages constitute the total set of pages that the campaign is scheduled to.

  • The set of active creatives (those without doNotDisplayFlag=yes) for the campaign is determined. If any of these creatives have the anyPositionFlag=yes, the campaign is regarded as scheduled to all of the positions in the history log.

  • The superset of positions that these creatives can go to is determined.

  • The union of the pages and positions determined above gives the total set of Page@Positions to which the campaign is scheduled.



Back to Top

Projection Algorithm
The Inventory Manager (IM) uses a projection algorithm to determine future impressions based on the historical data. This process is best described with an example:

Consider a single Page@Position for which the Page/Position history data table has the total impression information for the past 28 days. Each impression is plotted on a graph of Impression versus Day over a time-line of the last 28 days. Calculations (linear least squared fit ) are performed to find a line that best fits through these points and to find where that line intersects the current day on the graph. The intersection determines the average impressions for today and the slope of this line provides the impression growth per day for this Page@Position.


To project traffic in the future, the IM has 4 different extrapolation methods. The method that will be used is specified by the ForecastType parameter in the IM’s configuration file. Please note that the UI does not access the IM’s configuration file, but it does allow the user to view how the IM is currently configured -- and that includes the current ForecastType setting. So it is helpful to understand how each extrapolation method works.
  • NoGrowth: The number of average impressions calculated for today is used as the projected total traffic for all future days in the forecast period.

  • UniformGrowth: The best-fit line (calculated from the past data) is continued into the future. This shows a steady and regular growth in projected traffic as reflected by the impression growth per day, which was derived by statistical analysis of the historical data.

  • DOWGrowth: DOW stands for "Day of Week." In this type, an individual uniform growth prediction is made for each day of the week. To do this, seven separate best-fit lines are fitted into the data points -- one for each day of week in the historical data. Each individual line is uniformly extrapolated into the future to predict expected impressions or click-throughs on the corresponding day of week. This forecasting method has proven useful for situations in which there is a significant change in traffic on weekends.

  • CustomGrowth: This method is simply a modification of the UniformGrowth projection. When Custom Growth is selected, a uniform growth is projected (as previously described). But the uniform forecast is adjusted according to a parameter called CustomGrowthPct (Custom Growth Percentage), which is part of the Inventory Manager’s configuration file. This allows a forecast that is either a fraction of -- or an increase over -- uniform growth. The range of acceptable values for Custom Growth Percentage is -20 to +20. Custom Growth is useful when a site expects a seasonal or event-driven surge or drop-off in traffic in the near future.


Back to Top

Forecast Algorithm
The forecasting of Booked, Remnant and Available Impressions on a Page@Position for a given (future) date is determined as follows:
  • The Total number of expected impressions for each Page@Position is projected for that date.

  • The set of campaigns that are active for that date is determined.

  • The impression goal for each campaign in the active set is determined.

  • The impression goal for each campaign is distributed among the Page@Positions to which these campaigns are scheduled according to the proportion of their traffic profile.

  • The contribution of each campaign to a Page@Position is added to determine the Booked impressions on that Page@Position.

  • If Total > Booked, and if there are any Remnant campaigns (OPEN or HOUSE) scheduled to that Page@Position, the Remnant impressions on that item will be determined by Remnant = Total - Booked; In this case, the Remnant impressions are evenly distributed among the Remnant campaigns. If Total < Booked, or there are no active Remnant campaigns scheduled to this Page@Position, Remnant impressions is zero.

  • The Available inventory on the Page@Position is determined by AVAIL = Total - Booked. A positive value indicates an undersold condition. A negative value reflects an oversold condition and indicates that remedial action should be taken by administrative personnel.

  • The Remnant impression contributions from every Page@Position to which a campaign is scheduled are added to get an estimate of the total Remnant impressions projected for that campaign.

  • The numbers for all other inventory items are inferred by adding up the corresponding numbers for their constituent Page@Positions.


Back to Top