You are here

function google_analytics_counter_get_start_date in Google Analytics Counter 7.3

Implements hook_action_info().

2 calls to google_analytics_counter_get_start_date()
google_analytics_counter.module in ./google_analytics_counter.module
Basic functions for this module.
google_analytics_counter_update_path_counts in ./google_analytics_counter_data.inc
Find how many distinct paths does Google Analytics have for this profile. This function is triggered by hook_cron().

File

./google_analytics_counter.module, line 43
Basic functions for this module.

Code

function google_analytics_counter_get_start_date() {
  if (variable_get('google_analytics_counter_advanced_date_checkbox') == 1) {
    $start_date = variable_get('google_analytics_counter_fixed_start_date', '2005-01-01');
  }
  else {
    $period = variable_get('google_analytics_counter_variable_start_date', GOOGLE_ANALYTICS_COUNTER_YEAR);
    $start_date = date('Y-m-d', REQUEST_TIME - $period);
  }
  return $start_date;
}