You are here

function drush_ga_stats_generate in Google Analytics Statistics 7.2

Same name and namespace in other branches
  1. 7 ga_stats.drush.inc \drush_ga_stats_generate()

Command callback for ga-stats-generate.

File

./ga_stats.drush.inc, line 64

Code

function drush_ga_stats_generate() {
  $metric = drush_get_option('metric', 'pageviews');
  $timeframe = drush_get_option('timeframe', 'month');
  drush_log(dt('Generating data for metric "!metric" and timeframe "!timeframe".', array(
    '!metric' => $metric,
    '!timeframe' => $timeframe,
  )));
  if (drush_ga_stats_randomize($metric, $timeframe)) {
    drush_log('Google Analytics Statistics have been randomly generated.', 'success');
  }
}