I did some little changes to accomlish that..
look for the functions and replace and add the code…
hopefully the author will update it..?
save-ga-local.php:
function register_save_ga_locally_settings() {
……
register_setting (‘save-ga-locally-basic-settings’,’sgal_use_anonymize_ip’);
…..
}
<h2>Host Google Analytics Locally</h2>
……
$sgal_use_anonymize_ip = esc_attr(get_option(‘sgal_use_anonymize_ip’));
…..
… and then a bit further at the end of the table..
………..
<tr valign=”top”>
<th scope=”row”>Use anonymize ip?</th>
<td><input type=”checkbox” name=”sgal_use_anonymize_ip” <?php if($sgal_use_anonymize_ip == “on”) echo ‘ checked ‘ ?>/></td>
</tr>
</table>
…………
function add_ga_header_script() {
……………add this at the top of the function
$sgal_use_anonymize_ip = esc_attr(get_option(‘sgal_use_anonymize_ip’));
……..
……..add this at the end of the function and replace the existing code
$_anonymize_ip = “”;
if($sgal_use_anonymize_ip == “on”)$_anonymize_ip = “ga(‘set’, ‘anonymizeIp’, true);”;
echo “ga(‘create’, ‘” . $sgal_tracking_id . “‘, ‘auto’);
“.$_anonymize_ip.”
ga(‘send’, ‘pageview’);
</script>”;
}
thats it. only deactivate and reactivate , then adjust the pluginoptions in the backend.
works like a charm.