You are here

function googleanalytics_install in Google Analytics 7

Same name and namespace in other branches
  1. 5 googleanalytics.install \googleanalytics_install()
  2. 6 googleanalytics.install \googleanalytics_install()
  3. 6.2 googleanalytics.install \googleanalytics_install()

Implements hook_install().

File

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

Code

function googleanalytics_install() {

  // By German laws it's always best to enable the anonymizing of IP addresses.
  // NOTE: If this is also an important default setting in other countries, please let us know!
  $countries = array(
    'DE',
  );
  if (in_array(variable_get('site_default_country', ''), $countries)) {
    variable_set('googleanalytics_tracker_anonymizeip', 1);
  }
}