--- google_analytics/googleanalytics.module	2007-10-12 06:21:27.000000000 -0500
+++ googleanalytics.module	2007-10-23 17:14:00.000000000 -0500
@@ -111,6 +95,9 @@
 		// Add any custom code snippets if specified
 		$codesnippet = variable_get('googleanalytics_codesnippet', '');
 
+		// Add any custom variables if specified
+		$variables = variable_get('googleanalytics_variables', '');
+
     // Should a local cached copy of Urchin.js be used?
     if (variable_get('googleanalytics_cache', 0) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC)) {
       $source = googleanalytics_cache();
@@ -123,7 +110,7 @@
     }
 
     $script = '<script type="text/javascript" src="'. $source ."\"></script>\n";
-    $script .= '<script type="text/javascript">'. $downloadtracker ."\n_uacct = \"". $id ."\";urchinTracker();{$segmentation}{$codesnippet}\n</script>\n";
+    $script .= '<script type="text/javascript">'. $downloadtracker ."\n_uacct = \"". $id ."\";{$variables}urchinTracker();{$segmentation}{$codesnippet}\n</script>\n";
 
     return $script;
   }
@@ -239,6 +226,14 @@
     $form['advanced']['googleanalytics_cache']['#description'] .= ' '. t('<a href="!url">Public file transfers</a> must be enabled to allow local caching.', array('!url' => url('admin/settings/file-system', drupal_get_destination())));
   }
 
+  $form['advanced']['googleanalytics_variables'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Urchin Variables'),
+    '#default_value' => variable_get('googleanalytics_variables', ''),
+    '#rows' => 10,
+    '#description' => t('Paste custom Urchin variables here. These will appear before the call to urchinTracker() and will be added to every page that Google Analytics appears on. <strong>Do not include the &lt;script&gt; tags</strong>, and always end your code with a semicolon (;).')
+  );
+
   $form['advanced']['googleanalytics_codesnippet'] = array(
     '#type' => 'textarea',
     '#title' => t('JavaScript Code'),
