You are here

function googleanalytics_update_6001 in Google Analytics 5

Same name and namespace in other branches
  1. 6.4 googleanalytics.install \googleanalytics_update_6001()
  2. 6 googleanalytics.install \googleanalytics_update_6001()
  3. 6.2 googleanalytics.install \googleanalytics_update_6001()
  4. 6.3 googleanalytics.install \googleanalytics_update_6001()
  5. 7.2 googleanalytics.install \googleanalytics_update_6001()
  6. 7 googleanalytics.install \googleanalytics_update_6001()

File

./googleanalytics.install, line 85
Installation file for Google Analytics module.

Code

function googleanalytics_update_6001() {
  $ret = array();
  variable_set('googleanalytics_visibility', 0);

  // Remove tracking from all administrative pages, see http://drupal.org/node/34970.
  $pages = array(
    'admin*',
    'user*',
    'node/add*',
    'node/*/*',
  );
  variable_set('googleanalytics_pages', implode("\n", $pages));
  $ret[] = array(
    'success' => TRUE,
    'query' => 'Added page tracking to every page except the listed pages: ' . implode(', ', $pages),
  );
  return $ret;
}