function googleanalytics_update_7001 in Google Analytics 7.2
Same name and namespace in other branches
- 7 googleanalytics.install \googleanalytics_update_7001()
Automatically enable anonymizing of IP addresses for Germany.
File
- ./
googleanalytics.install, line 334 - Installation file for Google Analytics module.
Code
function googleanalytics_update_7001() {
// By German law it's always best to enable the anonymizing of IP addresses.
$countries = array(
'DE',
);
if (in_array(variable_get('site_default_country', ''), $countries)) {
variable_set('googleanalytics_tracker_anonymizeip', 1);
return t('The default country in your regional settings is Germany. Anonymizing of IP addresses has been enabled for privacy reasons.');
}
else {
return t('The default country in your regional settings is <em>not</em> Germany. The anonymizing of IP addresses setting has not been changed. Make sure your site settings comply with the local privacy rules.');
}
}