From e1f21d2b864c82ef9b5790e45ae53db66c4e3327 Mon Sep 17 00:00:00 2001
From: Dries Buytaert
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 not always set properly by web browsers.
"; + return $output; } function statistics_cron() { - db_query("DELETE FROM referer WHERE ". time() ." - timestamp > ". variable_get("referer_clear", 604800)); + db_query("DELETE FROM referrer WHERE ". time() ." - timestamp > ". variable_get("referrer_clear", 604800)); } function statistics_perm() { @@ -23,8 +32,8 @@ function statistics_link($type) { 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 referers", "referer", variable_get("referer", 0), array("Disabled", "Enabled"), "If enabled, Drupal will count how many times your website is referred to by other websites."); - $output .= form_select("Discard referers older than", "referer_clear", variable_get("referer_clear", 604800), $period, "The time referer entries should be kept. Older entries will be automatically discarded. Requires crontab."); + $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; } @@ -33,8 +42,8 @@ function statistics_table_1($query) { $output .= "URL | date |
---|---|
url) ."\">". substr(check_output($referer->url), 0, 100) ." | ". format_date($referer->timestamp, "small") ." |
url) ."\">". substr(check_output($referrer->url), 0, 100) ." | ". format_date($referrer->timestamp, "small") ." |
URL | number |
---|---|
url) ."\">". substr(check_output($referer->url), 0, 100) ." | ". check_output($referer->count) ." |
url) ."\">". substr(check_output($referrer->url), 0, 100) ." | ". check_output($referrer->count) ." |
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 not always set properly by web browsers.
"; + return $output; } function statistics_cron() { - db_query("DELETE FROM referer WHERE ". time() ." - timestamp > ". variable_get("referer_clear", 604800)); + db_query("DELETE FROM referrer WHERE ". time() ." - timestamp > ". variable_get("referrer_clear", 604800)); } function statistics_perm() { @@ -23,8 +32,8 @@ function statistics_link($type) { 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 referers", "referer", variable_get("referer", 0), array("Disabled", "Enabled"), "If enabled, Drupal will count how many times your website is referred to by other websites."); - $output .= form_select("Discard referers older than", "referer_clear", variable_get("referer_clear", 604800), $period, "The time referer entries should be kept. Older entries will be automatically discarded. Requires crontab."); + $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; } @@ -33,8 +42,8 @@ function statistics_table_1($query) { $output .= "URL | date |
---|---|
url) ."\">". substr(check_output($referer->url), 0, 100) ." | ". format_date($referer->timestamp, "small") ." |
url) ."\">". substr(check_output($referrer->url), 0, 100) ." | ". format_date($referrer->timestamp, "small") ." |
URL | number |
---|---|
url) ."\">". substr(check_output($referer->url), 0, 100) ." | ". check_output($referer->count) ." |
url) ."\">". substr(check_output($referrer->url), 0, 100) ." | ". check_output($referrer->count) ." |