The statistics module gathers and presents useful log information from your Drupal site. Currently, the statistics module is limited to internal and external referrals display, but other analysis capabilities might be added in future.
"; $output .= "1. The external referrer log indicates which other sites are linking your website and how many visitors they refer. Each link made to your site - when a user on another site clicks on a link to your site - generates a referral entry in the log.
"; $output .= "2. The internal referrer log indicates the referrals within the domain of your site. This log is useful for assessing and evaluating the structure of your website, to learn which pages are being accessed, and to gain insight into the way users are navigating your site.
"; $output .= "Drupal automatically rotates the referrer logs after a set period of time. The life-time of the accumulated data can be configured via the settings and filters option under site administration.
"; $output .= "Warning: Drupal gets the referrer information from the HTTP_REFERER environment variable. This is not always set properly by web browsers.
"; return $output; } function statistics_cron() { db_query("DELETE FROM referrer WHERE ". time() ." - timestamp > ". variable_get("referrer_clear", 604800)); } function statistics_perm() { return array("administer statistics"); } function statistics_link($type) { if ($type == "admin" && user_access("administer statistics")) { $links[] = "statistics"; } return $links ? $links : array(); } function statistics_conf_options() { $period = array(3600 => format_interval(3600), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200), 4838400 => format_interval(4838400), 9676800 => format_interval(9676800)); $output .= form_select("Track referrers", "referrer", variable_get("referrer", 0), array("Disabled", "Enabled"), "If enabled, Drupal will count how many times your website is referred to by other websites."); $output .= form_select("Discard referrers older than", "referrer_clear", variable_get("referrer_clear", 604800), $period, "The time referrer entries should be kept. Older entries will be automatically discarded. Requires crontab."); return $output; } function statistics_table_1($query) { $result = db_query($query); $output .= "URL | date |
---|---|
url) ."\">". substr(check_output($referrer->url), 0, 100) ." | ". format_date($referrer->timestamp, "small") ." |
URL | number |
---|---|
url) ."\">". substr(check_output($referrer->url), 0, 100) ." | ". check_output($referrer->count) ." |