Recording Historical Data in Scout

April 28 Bullet_white By Derek Bullet_white Posted in HowTo Bullet_white Comments Comments

By default, when you create a report in Scout, we assume that the data corresponds to the time the report was submitted.

Sometimes this isn’t the case – for example, you can retrieve the number of subscribers to your RSS feeds in Feedburner, but not from the current day.

You can override the time Scout records the data in a Plugin with the special :scout_time report key.

Here’s an example:


# typical report data 
{:circulation => 1000}

# correspond the data w/ February 24, 2008
{:circulation => 1000, :scout_time => Time.parse("2/24/08")}

When displaying the data on a graph, the data will be shown on 2/24 and not the current date:

Scout ~ Derek Laptop

Learn more about creating Scout Plugins

Get notified of new posts.

Once a month, we'll deliver a finely-curated selection of optimization tips to your inbox.

Comments

comments powered by Disqus