### Eclipse Workspace Patch 1.0
#P drupal-contrib-6--1
Index: modules/google_analytics/googleanalytics.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics/googleanalytics.admin.inc,v
retrieving revision 1.2.2.12
diff -u -r1.2.2.12 googleanalytics.admin.inc
--- modules/google_analytics/googleanalytics.admin.inc	15 Feb 2008 19:20:40 -0000	1.2.2.12
+++ modules/google_analytics/googleanalytics.admin.inc	19 Feb 2008 20:38:09 -0000
@@ -8,7 +8,7 @@
 /**
  * Implementation of hook_admin_settings() for configuring the module
  */
-function googleanalytics_admin_settings() {
+function googleanalytics_admin_settings_form(&$form_state) {
   $form['account'] = array(
     '#type' => 'fieldset',
     '#title' => t('Analytics Account Settings'),
@@ -17,12 +17,12 @@
 
   $form['account']['googleanalytics_account'] = array(
     '#type' => 'textfield',
-    '#title' => t('User ID'),
+    '#title' => t('Google Analytics account number'),
     '#default_value' => variable_get('googleanalytics_account', 'UA-'),
     '#size' => 15,
     '#maxlength' => 20,
     '#required' => TRUE,
-    '#description' => t('The user account is unique to the websites domain. You can obtain an user account from the <a href="@url">Google Analytics</a> website.', array('@url' => 'http://www.google.com/analytics/'))
+    '#description' => t('The user account number (UA-xxxxxx-x) is unique to the websites domain. You can obtain an user account from the <a href="@url">Google Analytics</a> website.', array('@url' => 'http://www.google.com/analytics/'))
   );
 
   $form['account']['googleanalytics_legacy_version'] = array(
@@ -144,3 +144,9 @@
 
   return system_settings_form($form);
 }
+
+function googleanalytics_admin_settings_form_validate($form, &$form_state) {
+  if (!preg_match('/^UA-\d{4,}-\d+$/', $form_state['values']['googleanalytics_account'])) {
+    form_set_error('googleanalytics_account', t('A valid Google Analytics account number is case sensitive and formated like UA-xxxxxx-x.'));
+  }
+}
\ No newline at end of file
Index: modules/google_analytics/googleanalytics.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/google_analytics/googleanalytics.module,v
retrieving revision 1.16.2.17
diff -u -r1.16.2.17 googleanalytics.module
--- modules/google_analytics/googleanalytics.module	15 Feb 2008 19:44:40 -0000	1.16.2.17
+++ modules/google_analytics/googleanalytics.module	19 Feb 2008 20:38:09 -0000
@@ -24,7 +24,7 @@
     'title' => 'Google Analytics',
     'description' => 'Configure the settings used to generate your Google Analytics site map.',
     'page callback' => 'drupal_get_form',
-    'page arguments' => array('googleanalytics_admin_settings'),
+    'page arguments' => array('googleanalytics_admin_settings_form'),
     'access arguments' => array('administer site configuration'),
     'file' => 'googleanalytics.admin.inc',
     'type' => MENU_NORMAL_ITEM,
@@ -178,7 +178,7 @@
 
   if ($phase == 'runtime') {
     // Raise warning if Google user account has not been set yet.
-    if (variable_get('googleanalytics_account', 'UA-') == 'UA-') {
+    if (!preg_match('/^UA-\d{4,}-\d+$/', variable_get('googleanalytics_account', 'UA-'))) {
       $requirements['googleanalytics'] = array(
         'title' => t('Google Analytics module'),
         'description' => t('Google Analytics module has not been configured yet. Please configure its settings from the <a href="@url">Google Analytics settings page</a>.', array('@url' => url('admin/settings/googleanalytics'))),
