The Ad Forecaster works by predicting how the users will behave in the future and simulating the ad server’s delivery logic with their future impressions.
To simulate the delivery logic, the Ad Forecaster requires up-to-date information about the running campaigns. Campaign information can be updated using the Campaigns API.
Updating Campaigns
Each Campaign object has a deliveredImpressions
and
a lastUpdate
field.
It is recommended to periodically update each campaign with its real delivered impressions to have
more accurate forecasts. For example, if our campaign c123
had 5000
impressions at
2017-09-02T12:00:00Z
, we can update by sending it to the Campaign PUT
endpoint with deliveredImpressions: 5000
and
lastUpdate: "2017-09-02T12:00:00Z"
Performance considerations
When a campaign is updated, the Ad Forecaster will usually need to clear its cached results. This can impact the system’s performance.
In order to minimize the performance impact, it is recommended to update multiple campaigns in bulk
(so that the cache is only dropped once per bulk update). This will also lead to more accurate
results, as competing campaigns with different lastUpdate
values might show wrong results.
For accurate results, it is also recommended that each campaign is updated at least once per day. Still, it is important to take into account the accuracy/performance trade-off when scheduling campaign updates. As a rule of thumb, campaign updates should be scheduled at most every 15 minutes.